Netty Replicator - improve the reconnection and keepalive mechanisms
[mdsal.git] / replicate / mdsal-replicate-netty / src / main / java / org / opendaylight / mdsal / replicate / netty / Constants.java
index e7f42eb19c1a2c31acd322f0dee6fd5401d891e8..8041640ebce19d8ab7c136a11c21c208455a5b3d 100644 (file)
@@ -36,6 +36,10 @@ final class Constants {
      * 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.
@@ -54,6 +58,9 @@ final class Constants {
     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
     }