Example #1
0
        private ByteString ConstructControlMessagePdu(CommandType code, AkkaHandshakeInfo.Builder handshakeInfo = null)
        {
            var controlMessageBuilder = AkkaControlMessage.CreateBuilder()
                                        .SetCommandType(code);

            if (handshakeInfo != null)
            {
                controlMessageBuilder = controlMessageBuilder.SetHandshakeInfo(handshakeInfo);
            }

            return
                (AkkaProtocolMessage.CreateBuilder().SetInstruction(controlMessageBuilder.Build()).Build().ToByteString());
        }
Example #2
0
 public override ByteString ConstructPayload(ByteString payload)
 {
     return(AkkaProtocolMessage.CreateBuilder().SetPayload(payload).Build().ToByteString());
 }