mirror of
https://code.briarproject.org/briar/briar.git
synced 2026-02-12 10:49:06 +01:00
Further progress towards incremental subscription updates.
This commit is contained in:
@@ -14,8 +14,8 @@ public interface PacketFactory {
|
||||
|
||||
Request createRequest(BitSet requested, int length);
|
||||
|
||||
SubscriptionUpdate createSubscriptionUpdate(Map<Group, Long> subs,
|
||||
long timestamp);
|
||||
SubscriptionUpdate createSubscriptionUpdate(Map<GroupId, GroupId> holes,
|
||||
Map<Group, Long> subs, long expiry, long timestamp);
|
||||
|
||||
TransportUpdate createTransportUpdate(Collection<Transport> transports,
|
||||
long timestamp);
|
||||
|
||||
@@ -21,9 +21,6 @@ public interface ProtocolConstants {
|
||||
/** The maximum length of a property's key or value in UTF-8 bytes. */
|
||||
static final int MAX_PROPERTY_LENGTH = 100;
|
||||
|
||||
/** The maximum number of groups a node may subscribe to. */
|
||||
static final int MAX_GROUPS = 5000;
|
||||
|
||||
/** The maximum length of a group's name in UTF-8 bytes. */
|
||||
static final int MAX_GROUP_NAME_LENGTH = 50;
|
||||
|
||||
|
||||
@@ -5,9 +5,18 @@ import java.util.Map;
|
||||
/** A packet updating the sender's subscriptions. */
|
||||
public interface SubscriptionUpdate {
|
||||
|
||||
/** Returns the holes contained in the update. */
|
||||
Map<GroupId, GroupId> getHoles();
|
||||
|
||||
/** Returns the subscriptions contained in the update. */
|
||||
Map<Group, Long> getSubscriptions();
|
||||
|
||||
/**
|
||||
* Returns the expiry time of the contact's database. Messages that are
|
||||
* older than the expiry time must not be sent to the contact.
|
||||
*/
|
||||
long getExpiryTime();
|
||||
|
||||
/**
|
||||
* Returns the update's timestamp. Updates that are older than the newest
|
||||
* update received from the same contact must be ignored.
|
||||
|
||||
Reference in New Issue
Block a user