예제 #1
0
 public IPooledBuffer Handle(ITransportConnectionCloseHeader header, Nothing _)
 {
     using (var headerProto = Header.Rent())
         using (var closeProto = ConnectionCloseHeader.Rent())
         {
             headerProto.Close = MergeToProto(closeProto, header);
             return(headerProto.Serialize());
         }
 }
예제 #2
0
 private static ConnectionCloseHeader MergeToProto(ConnectionCloseHeader proto, ITransportConnectionCloseHeader messageHeader)
 {
     proto            = proto ?? new ConnectionCloseHeader();
     proto.Completion = proto.Completion.MergeFrom(messageHeader.Completion);
     return(proto);
 }
 private ITransportConnectionCloseHeader ConvertFromProto(ConnectionCloseHeader proto)
 {
     return(_headerFactory.CreateConnectionCloseHeader(proto.Completion.ConvertFromProto()));
 }