SocketChannel socketChannel = UnsafeTcp.attach(fd);
NioSocketChannel channel = new NioSocketChannel(socketChannel);
this.channelFuture = channel.newSucceededFuture();
channel.pipeline().addLast("emit.afterConnect", new AfterConnectEventHandler(this.process, TCPWrap.this));
channel.pipeline().addLast("emit.eof", new EOFEventHandler(this.process, TCPWrap.this));
channel.pipeline().addLast("handle", new UnrefHandler(this));
process.getEventLoop().getEventLoopGroup().register(channel);
}
public TCPWrap(NodeProcess process, ChannelFuture channelFuture) {
super(process, channelFuture);