Пример #1
0
 public IPooledBuffer Handle(ITransportChannelOpenHeader header, Nothing _)
 {
     using (var headerProto = Header.Rent())
         using (var channelOpenProto = ChannelOpenHeader.Rent())
         {
             headerProto.ChannelOpen = MergeToProto(channelOpenProto, header);
             return(headerProto.Serialize());
         }
 }
Пример #2
0
 private static ChannelOpenHeader MergeToProto(ChannelOpenHeader proto, ITransportChannelOpenHeader messageHeader)
 {
     proto           = proto ?? new ChannelOpenHeader();
     proto.ChannelId = proto.ChannelId.MergeFrom(messageHeader.ChannelId);
     return(proto);
 }
 private ITransportChannelOpenHeader ConvertFromProto(ChannelOpenHeader proto)
 {
     return(_headerFactory.CreateChannelOpenHeader(proto.ChannelId.ConvertFromProtoStrict()));
 }