Socket.sendWithBlocking

This behaves exactly the same as gio.socket.Socket.send, except that the choice of blocking or non-blocking behavior is determined by the blocking argument rather than by socket's properties.

class Socket
ptrdiff_t
sendWithBlocking

Parameters

buffer ubyte[]

the buffer containing the data to send.

blocking bool

whether to do blocking or non-blocking I/O

cancellable gio.cancellable.Cancellable

Return Value

Type: ptrdiff_t

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