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 Socket.connect).

See Socket.send for additional information.

class Socket
ptrdiff_t
sendTo

Parameters

address SocketAddress
buffer string

the buffer containing the data to send.

cancellable Cancellable

a GCancellable or NULL

Return Value

Type: ptrdiff_t

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

Throws

GException on failure.

Meta

Since

2.22