mirror of
https://code.briarproject.org/briar/briar.git
synced 2026-02-12 10:49:06 +01:00
Request reader and unit test.
This commit is contained in:
@@ -12,5 +12,5 @@ public interface Ack {
|
||||
static final int MAX_SIZE = (1024 * 1024) - 100;
|
||||
|
||||
/** Returns the IDs of the acknowledged batches. */
|
||||
Collection<BatchId> getBatches();
|
||||
Collection<BatchId> getBatchIds();
|
||||
}
|
||||
|
||||
@@ -12,5 +12,5 @@ public interface Offer {
|
||||
static final int MAX_SIZE = (1024 * 1024) - 100;
|
||||
|
||||
/** Returns the message IDs contained in the offer. */
|
||||
Collection<MessageId> getMessages();
|
||||
Collection<MessageId> getMessageIds();
|
||||
}
|
||||
|
||||
19
api/net/sf/briar/api/protocol/Request.java
Normal file
19
api/net/sf/briar/api/protocol/Request.java
Normal file
@@ -0,0 +1,19 @@
|
||||
package net.sf.briar.api.protocol;
|
||||
|
||||
import java.util.BitSet;
|
||||
|
||||
/** A packet requesting some or all of the messages from an offer. */
|
||||
public interface Request {
|
||||
|
||||
/**
|
||||
* The maximum size of a serialised request, exlcuding encryption and
|
||||
* authentication.
|
||||
*/
|
||||
static final int MAX_SIZE = (1024 * 1024) - 100;
|
||||
|
||||
/**
|
||||
* Returns a sequence of bits corresponding to the sequence of messages in
|
||||
* the offer, where the i^th bit is set if the i^th message should be sent.
|
||||
*/
|
||||
BitSet getBitmap();
|
||||
}
|
||||
Reference in New Issue
Block a user