示例#1
0
 private static ChannelCloseHeader MergeToProto(ChannelCloseHeader proto, ITransportChannelCloseHeader messageHeader)
 {
     proto            = proto ?? new ChannelCloseHeader();
     proto.ChannelId  = proto.ChannelId.MergeFrom(messageHeader.ChannelId);
     proto.Completion = proto.Completion.MergeFrom(messageHeader.Completion);
     return(proto);
 }
示例#2
0
 public IPooledBuffer Handle(ITransportChannelCloseHeader header, Nothing _)
 {
     using (var headerProto = Header.Rent())
         using (var channelCloseProto = ChannelCloseHeader.Rent())
         {
             headerProto.ChannelClose = MergeToProto(channelCloseProto, header);
             return(headerProto.Serialize());
         }
 }
 private ITransportChannelCloseHeader ConvertFromProto(ChannelCloseHeader proto)
 {
     return(_headerFactory.CreateChannelCloseHeader(proto.ChannelId.ConvertFromProtoStrict(), proto.Completion.ConvertFromProto()));
 }