public int send(String host, int port, ByteBuffer buf, HandleListener listener, Object context)
throws NodeOSException
{
InetSocketAddress addr = new InetSocketAddress(host, port);
NetworkPolicy netPolicy = getNetworkPolicy();
if ((netPolicy != null) && !netPolicy.allowListening(addr)) {
log.debug("Address {} not allowed by network policy", addr);
throw new NodeOSException(Constants.EINVAL);
}
QueuedWrite qw = new QueuedWrite(buf, listener, context);