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]; }
public NioSocketChannel(io.netty.nio.SocketChannel socket) : this(null, socket) { }