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 g_socket_connect()). See g_socket_send() for additional information. Since 2.22

Parameters

address SocketAddress

a GSocketAddress, or NULL. [allow-none]

buffer string

the buffer containing the data to send. [array length=size][element-type guint8]

size gsize

the number of bytes to send

cancellable Cancellable

a GCancellable or NULL. [allow-none]

Return Value

Type: gssize

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

Throws

GException on failure.

Meta