code: @Override
      public void flush() throws TTransportException {
          ChannelBuffer flush = ChannelBuffers.dynamicBuffer();
          flush.writeBytes(output);
          channel.write(flush).awaitUninterruptibly();
      }
docs: We need data to be written and flushed at once.