SetProtocolSetHandler를 사용할 수 있는 IChannelPipe
Inheritance: IChannelPipe
示例#1
0
 public static ChannelPipe CreateChannelPipe(IPacketEncoder encoder, IPacketDecoder decoder, IChannelHandler handler)
 {
     var pipe = new ChannelPipe();
     pipe.SetCreateChannelAction((channel) =>
     {
         channel.SetConfig("encoder", encoder);
         channel.SetConfig("decoder", decoder);
         channel.SetConfig("handler", handler);
     });
     return pipe;
 }
示例#2
0
 private static void SetFactoryOption(ChannelPipe pipe)
 {
     PacketEncoder encoder = new PacketEncoder();
     pipe.SetProtocol(() => new ModifiableProtocol(encoder: encoder, decoder: encoder));
     pipe.SetHandler(() => Handler);
 }