title: Is it possible to use Netty in full duplex TCP communication?
body: <p>It seems that Netty can only process either read or write operations with a single TCP connection, but not both at the same time. I have a client which connects to the echo server application that is written with Netty and sends about 200k messages. </p>
  
  <p>The echo server simply accepts client connections and sends back any messages that are sent by the clients.</p>
  
  <p>The problem is I can't make Netty work with the TCP connection in the full-duplex mode. I'd like to process read and write operations on the server side simultaneously. In my case Netty reads all messages from the client and then sends them back which is resulting with a high latency.</p>
  
  <p>The client application fires two threads per connection. One for any write operations and the other one for read operations. And yes, the client is written in the plain old Java IO style.</p>
  
  <p>Maybe the problem is somehow related to the TCP options which I set on the server side:</p>
  
  <pre><code>    .childOption(ChannelOption.ALLOCATOR, PooledByteBufAllocator.DEFAULT)
      .childOption(ChannelOption.WRITE_BUFFER_HIGH_WATER_MARK, bufferWatermarkHigh)
      .childOption(ChannelOption.WRITE_BUFFER_LOW_WATER_MARK, bufferWatermarkLow)
      .childOption(ChannelOption.SO_RCVBUF, bufferInSize)
      .childOption(ChannelOption.SO_SNDBUF, bufferOutSize)
      .childOption(ChannelOption.SO_REUSEADDR, true)
      .childOption(ChannelOption.SO_KEEPALIVE, true)
      .childOption(ChannelOption.TCP_NODELAY, true);
  </code></pre>