Beispiel #1
0
        protected override void InitChannel(TcpSocketChannel channel)
        {
            try
            {
                Channel peer = new PeerConnection();
                peer.Init(channel.Pipeline, this.remote_id, this.is_discovery_mode);

                channel.Configuration.RecvByteBufAllocator = new FixedRecvByteBufAllocator(256 * 1024);
                channel.Configuration.SetOption(ChannelOption.SoRcvbuf, 256 * 1024);
                channel.Configuration.SetOption(ChannelOption.SoBacklog, 1024);
            }
            catch (System.Exception e)
            {
                Logger.Error(e.Message);
            }
        }