Socket.sendWithBlocking

This behaves exactly the same as g_socket_send(), except that the choice of blocking or non-blocking behavior is determined by the blocking argument rather than by socket's properties. Since 2.26

class Socket
sendWithBlocking

Parameters

buffer string

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

size gsize

the number of bytes to send

blocking int

whether to do blocking or non-blocking I/O

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