Provide auto-reconnection for Sink
[mdsal.git] / replicate / mdsal-replicate-netty / src / main / java / org / opendaylight / mdsal / replicate / netty / Constants.java
index 1fff84f4e5df84f7da57dd967cc6ded774d0c637..e7f42eb19c1a2c31acd322f0dee6fd5401d891e8 100644 (file)
@@ -32,6 +32,10 @@ final class Constants {
      * 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;
 
     /**
      * Length of the length field in each transmitted frame.
@@ -47,6 +51,9 @@ final class Constants {
 
     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 }));
+
     private Constants() {
         // Hidden on purpose
     }