mirror of
https://code.briarproject.org/briar/briar.git
synced 2026-02-13 11:19:04 +01:00
Implemented OfferWriter and RequestWriter, made all the writers
reusable (though not thread-safe), and guiced the readers.
This commit is contained in:
@@ -16,6 +16,8 @@ public interface Tags {
|
||||
static final int GROUP_ID = 6;
|
||||
static final int MESSAGE = 7;
|
||||
static final int MESSAGE_ID = 8;
|
||||
static final int SUBSCRIPTIONS = 9;
|
||||
static final int TRANSPORTS = 10;
|
||||
static final int OFFER = 9;
|
||||
static final int REQUEST = 10;
|
||||
static final int SUBSCRIPTIONS = 11;
|
||||
static final int TRANSPORTS = 12;
|
||||
}
|
||||
|
||||
@@ -8,6 +8,10 @@ public interface PacketWriterFactory {
|
||||
|
||||
BatchWriter createBatchWriter(OutputStream out);
|
||||
|
||||
OfferWriter createOfferWriter(OutputStream out);
|
||||
|
||||
RequestWriter createRequestWriter(OutputStream out);
|
||||
|
||||
SubscriptionWriter createSubscriptionWriter(OutputStream out);
|
||||
|
||||
TransportWriter createTransportWriter(OutputStream out);
|
||||
|
||||
@@ -7,5 +7,5 @@ import java.util.BitSet;
|
||||
public interface RequestWriter {
|
||||
|
||||
/** Writes the contents of the request. */
|
||||
void writeBitmap(BitSet b) throws IOException;
|
||||
void writeBitmap(BitSet b, int length) throws IOException;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user