public int send(Membership mgr, InternalDistributedMember[] destinations,
      DistributionMessage msg, long ackWaitThreshold, long ackSAThreshold)
      throws ConnectExceptions, NotSerializableException {

    if (disconnected) {
      if (logger.isDebugEnabled()) {
        logger.debug("Returning from DirectChannel send because channel is disconnected: {}", msg);
      }
      return 0;
    }
    if (destinations == null) {
      if (logger.isDebugEnabled()) {
        logger.debug("Returning from DirectChannel send because null set passed in: {}", msg);
      }
      return 0;
    }
    if (destinations.length == 0) {
      if (logger.isDebugEnabled()) {
        logger.debug("Returning from DirectChannel send because empty destinations passed in {}",
            msg);
      }
      return 0;
    }

    msg.setSender(localAddr);
    if (destinations.length == 1) {
      return sendToOne(mgr, destinations, msg, ackWaitThreshold, ackSAThreshold);
    } else {
      return sendToMany(mgr, destinations, msg, ackWaitThreshold, ackSAThreshold);
    }
  }
Method send.

@param mgr - the membership manager
@param destinations - the address(es) to send the message to.
@param msg - the message to send
@param ackSAThreshold severe alert threshold
@return number of bytes sent
@throws ConnectExceptions if message could not be send to one or more of the
        <code>destinations</code>
@throws NotSerializableException If the content cannot be serialized
@throws ConnectionException if the conduit has stopped
geode-core/src/main/java/org/apache/geode/distributed/internal/direct/DirectChannel.java