ConnectedSocket.send

Send data on the connection. If the socket is blocking and there is no buffer space left, $(D_PSYMBOL send) waits, non-blocking socket returns 0 in this case.

class ConnectedSocket
const @trusted @nogc
ptrdiff_t
send
(
const(ubyte)[] buf
,
Flags flags = Flag.none
)

Parameters

buf const(ubyte)[]

Data to be sent.

flags Flags

Flags.

Return Value

Type: ptrdiff_t

The number of bytes actually sent.

Throws

$(D_PSYMBOL SocketException) if unable to send.

Meta