public void realFlush(boolean lastFlushForMessage) {
    if (isOverflowMode()) {
      if (overflowBuf == null) {
        overflowBuf = new HeapDataOutputStream(
            buffer.capacity() - Connection.MSG_HEADER_BYTES, KnownVersion.CURRENT);
      }
      return;
    }
    buffer.flip();
    setMessageHeader();
    final int serializedBytes = buffer.limit();
    flushedBytes += serializedBytes;
    DistributionMessage conflationMsg = null;
    if (normalMsg) {
      // we can't conflate chunked messages; this fixes bug 36633
      conflationMsg = msg;
    }
    stats.endMsgSerialization(serStartTime);
    for (final Iterator<Connection> it = connections.iterator(); it.hasNext();) {
      final Connection connection = it.next();
      try {
        connection.sendPreserialized(buffer,
            lastFlushForMessage && msg.containsRegionContentChange(), conflationMsg);
      } catch (IOException ex) {
        it.remove();
        if (connectExceptions == null) {
          connectExceptions = new ConnectExceptions();
        }
        connectExceptions.addFailure(connection.getRemoteAddress(), ex);
        connection.closeForReconnect(
            String.format("closing due to %s", "IOException"));
      } catch (ConnectionException ex) {
        it.remove();
        if (connectExceptions == null) {
          connectExceptions = new ConnectExceptions();
        }
        connectExceptions.addFailure(connection.getRemoteAddress(), ex);
        connection.closeForReconnect(
            String.format("closing due to %s", "ConnectionException"));
      }
      buffer.rewind();
    }
    startSerialization();
    buffer.clear();
    buffer.position(Connection.MSG_HEADER_BYTES);
  }
Create message streamers splitting into versioned streamers, if required, for given list of
connections to remote nodes. This method can either return a single MsgStreamer object or a
List of MsgStreamer objects.
geode-core/src/main/java/org/apache/geode/internal/tcp/MsgStreamer.java