Socket.sendTo

ptrdiff_t sendTo(gio.socket_address.SocketAddress address, ubyte[] buffer, gio.cancellable.Cancellable cancellable = null)

Tries to send size bytes from buffer to address. If address is null then the message is sent to the default receiver (set by [gio.socket.Socket.connect]).

See [gio.socket.Socket.send] for additional information.

Parameters

addressa #GSocketAddress, or null
bufferthe buffer containing the data to send.
cancellablea [gio.cancellable.Cancellable] or null

Returns

Number of bytes written (which may be less than size), or -1

on error

Throws

[ErrorWrap]