send_to


Description:

public ssize_t send_to (SocketAddress? address, uint8[] buffer, Cancellable? cancellable = null) throws Error

Tries to send buffer.length bytes from buffer to address.

If address is null then the message is sent to the default receiver (set by connect).

See send for additional information.

Parameters:

this

a Socket

address

a SocketAddress, or null

buffer

the buffer containing the data to send.

cancellable

a gcancellable or null

size

the number of bytes to send

Returns:

Number of bytes written (which may be less than buffer.length), or -1 on error