コード例 #1
0
            void Accept(Tcp tcp)
            {
                var ch = (TcpServerChannel)this.channel;
                IChannelPipeline            pipeline    = ch.Pipeline;
                IRecvByteBufAllocatorHandle allocHandle = this.RecvBufAllocHandle;

                bool      closed    = false;
                Exception exception = null;

                try
                {
                    var tcpChannel = new TcpChannel(ch, tcp);
                    ch.Pipeline.FireChannelRead(tcpChannel);
                    allocHandle.IncMessagesRead(1);
                }
                catch (ObjectDisposedException)
                {
                    closed = true;
                }
                catch (Exception ex)
                {
                    exception = ex;
                }

                allocHandle.ReadComplete();
                pipeline.FireChannelReadComplete();

                if (exception != null)
                {
                    pipeline.FireExceptionCaught(exception);
                }

                if (closed && ch.Open)
                {
                    this.CloseSafe();
                }
            }
コード例 #2
0
 public TcpChannelUnsafe(TcpChannel channel) : base(channel)
 {
 }
コード例 #3
0
ファイル: TcpChannelConfig.cs プロジェクト: zmk523/DotNetty
 public TcpChannelConfig(TcpChannel channel) : base(channel)
 {
 }