* End-of-DataTreeCandidate serialization stream. The payload is empty.
*/
static final byte MSG_DTC_APPLY = 4;
+ /**
+ * Verify the connection is alive.
+ */
+ static final int MSG_PING = 5;
+ /**
+ * Verify the connection is alive.
+ */
+ static final int MSG_PONG = 6;
/**
* Length of the length field in each transmitted frame.
*/
static final int LENGTH_FIELD_MAX = 1024 * 1024;
- static final ByteBuf EMPTY_DATA = Unpooled.wrappedBuffer(new byte[] { MSG_EMPTY_DATA });
- static final ByteBuf DTC_APPLY = Unpooled.wrappedBuffer(new byte[] { MSG_DTC_APPLY });
+ static final ByteBuf EMPTY_DATA = Unpooled.unreleasableBuffer(
+ Unpooled.wrappedBuffer(new byte[] { MSG_EMPTY_DATA }));
+
+ static final ByteBuf DTC_APPLY = Unpooled.unreleasableBuffer(Unpooled.wrappedBuffer(new byte[] { MSG_DTC_APPLY }));
+
+ static final ByteBuf PING = Unpooled.unreleasableBuffer(
+ Unpooled.wrappedBuffer(new byte[] { MSG_PING }));
+
+ static final ByteBuf PONG = Unpooled.unreleasableBuffer(
+ Unpooled.wrappedBuffer(new byte[] { MSG_PONG }));
private Constants() {
// Hidden on purpose