Пример #1
0
        public ServerChannel(IContainer container, IChannelPipeline pipeline, IByteBuffer buffer, IFramer framer, ConfigurationSetting setting)
            : base(buffer, framer)
        {
            Ensure.IsNotNull(container);
            Ensure.IsNotNull(pipeline);
            Ensure.IsNotNull(buffer);
            Ensure.IsNotNull(framer);

            SendingBufferSize   = setting.SocketSendBufferSize;
            ReceivingBufferSize = setting.SocketReceiveBufferSize;

            _container = container;
            _setting   = setting;

            this.pipeline = pipeline;

            _channelPipelineFactory?.Invoke(pipeline);

            SetSocket(SocketUtils.CreateSocket());
        }
Пример #2
0
 public ClientChannel(IChannelPipeline pipeline, IByteBuffer buffer, IFramer framer)
     : base(buffer, framer)
 {
     this.pipeline = pipeline;
     base.SetSocket(SocketUtils.CreateSocket());
 }