result = engine.wrap(EMPTY_BUFFER, outNetBuf);
if (result.bytesProduced() > 0) {
outNetBuf.flip();
ChannelBuffer msg = ChannelBuffers.buffer(outNetBuf.remaining());
msg.writeBytes(outNetBuf.array(), 0, msg.capacity());
outNetBuf.clear();
if (channel.isConnected()) {
future = future(channel);
write(ctx, channel, future, msg);
}