send abstract method

int send(
  1. List<int> buffer,
  2. InternetAddress address,
  3. int port
)

Asynchronously sends a datagram.

Returns the number of bytes written. This will always be either the size of buffer or 0.

A return value of 0 indicates that sending the datagram would block and that the send call can be tried again.

A return value of the size of buffer indicates that a request to transmit the datagram was made to the operating system. It does not indicate that the operating system successfully sent the datagram. If a local failure to send the datagram occurs then a an error event will be added to the Stream. If a networking or remote failure occurs then it will not be reported.

The maximum size of a UDP datagram is 65535 byes (including both data and headers) but the practical maximum size is likely to be much lower due to operating system limits and the network's maximum transmission unit (MTU).

Implementation

int send(List<int> buffer, InternetAddress address, int port);