void flushBuffer() throws IOException {
    final ByteBuffer cb = getCommBuffer();
    if (socketChannel != null) {
      cb.flip();
      do {
        socketChannel.write(cb);
      } while (cb.remaining() > 0);
    } else {
      outputStream.write(cb.array(), 0, cb.position());
    }
    if (messageStats != null) {
      messageStats.incSentBytes(cb.position());
    }
    cb.clear();
  }
Sends this message out on its socket.
geode-core/src/main/java/org/apache/geode/internal/cache/tier/sockets/Message.java