Example #1
0
 public IPooledBuffer Handle(ITransportConnectionOpenHeader header, Nothing _)
 {
     using (var headerProto = Header.Rent())
         using (var openProto = ConnectionOpenHeader.Rent())
         {
             headerProto.Open = MergeToProto(openProto, header);
             return(headerProto.Serialize());
         }
 }
Example #2
0
 private static ConnectionOpenHeader MergeToProto(ConnectionOpenHeader proto, ITransportConnectionOpenHeader messageHeader)
 {
     proto = proto ?? new ConnectionOpenHeader();
     proto.ConnectionId = proto.ConnectionId.MergeFrom(messageHeader.ConnectionId);
     return(proto);
 }
 private ITransportConnectionOpenHeader ConvertFromProto(ConnectionOpenHeader proto)
 {
     return(_headerFactory.CreateConnectionOpenHeader(proto.ConnectionId.ConvertFromProtoStrict()));
 }