Added a flag to indicate the last frame of the connection.

This commit is contained in:
akwizgran
2012-02-07 10:46:01 +00:00
parent e8660c13ca
commit 4ca5be7c06
13 changed files with 117 additions and 45 deletions

View File

@@ -4,8 +4,6 @@ import java.io.IOException;
public interface ProtocolWriter {
void flush() throws IOException;
int getMaxBatchesForAck(long capacity);
int getMaxMessagesForOffer(long capacity);
@@ -23,4 +21,8 @@ public interface ProtocolWriter {
void writeSubscriptionUpdate(SubscriptionUpdate s) throws IOException;
void writeTransportUpdate(TransportUpdate t) throws IOException;
void flush() throws IOException;
void close() throws IOException;
}

View File

@@ -9,7 +9,7 @@ public interface TransportConstants {
static final int MAX_FRAME_LENGTH = 65536; // 2^16, 64 KiB
/** The length of the frame header in bytes. */
static final int FRAME_HEADER_LENGTH = 8;
static final int FRAME_HEADER_LENGTH = 9;
/** The length of the MAC in bytes. */
static final int MAC_LENGTH = 32;