Esempio n. 1
0
        public NioSocketChannel(Channel parent, io.netty.nio.SocketChannel socket) : base(parent, socket)
        {
            if (parent == null)
            {
                _isActive        = false;
                isTryReconnect   = true;
                tryReconnectTime = 1000;
            }
            else
            {
                _isActive      = true;
                _localAddress  = socket.Client.LocalEndPoint.Serialize();
                _remoteAddress = socket.Client.RemoteEndPoint.Serialize();
            }

            this.tcpClient = socket;
            buffer         = new byte[1024];
        }
Esempio n. 2
0
 public NioSocketChannel(io.netty.nio.SocketChannel socket) : this(null, socket)
 {
 }