mirror of
https://code.briarproject.org/briar/briar.git
synced 2026-02-13 19:29:06 +01:00
Replaced PacketWriter methods with a constant.
This commit is contained in:
@@ -4,12 +4,6 @@ import java.io.IOException;
|
||||
|
||||
public interface PacketWriter {
|
||||
|
||||
int getMaxMessagesForAck(long capacity);
|
||||
|
||||
int getMaxMessagesForRequest(long capacity);
|
||||
|
||||
int getMaxMessagesForOffer(long capacity);
|
||||
|
||||
void writeAck(Ack a) throws IOException;
|
||||
|
||||
void writeMessage(byte[] raw) throws IOException;
|
||||
|
||||
@@ -24,4 +24,7 @@ public interface SyncConstants {
|
||||
|
||||
/** The maximum length of a message body in bytes. */
|
||||
int MAX_MESSAGE_BODY_LENGTH = MAX_MESSAGE_LENGTH - MESSAGE_HEADER_LENGTH;
|
||||
|
||||
/** The maximum number of message IDs in an ack, offer or request packet. */
|
||||
int MAX_MESSAGE_IDS = MAX_PACKET_PAYLOAD_LENGTH / UniqueId.LENGTH;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user