Socket.sendTo

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

address gio.socket_address.SocketAddress

a #GSocketAddress, or null

buffer ubyte[]

the buffer containing the data to send.

cancellable gio.cancellable.Cancellable

Return Value

Type: ptrdiff_t

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