nioChannel.config().setOption(ChannelOption.ALLOW_HALF_CLOSURE, true);
//nioChannel.pipeline().addLast("debug", new DebugHandler("duplex:" + fd + " // " + process.getPosix().getpid()));
nioChannel.pipeline().addLast("emit.data", new DataEventHandler(this.process, this));
nioChannel.pipeline().addLast("emit.eof", new EOFEventHandler(this.process, this));
this.channelFuture = nioChannel.newSucceededFuture();
process.getEventLoop().getEventLoopGroup().register(nioChannel);
}
this.type = Type.DUPLEX;
}