ConnectedSocket.receive

Receive data on the connection.

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

Parameters

buf ubyte[]

Buffer to save received data.

flags Flags

Flags.

Return Value

Type: ptrdiff_t

The number of bytes received or 0 if nothing received because the call would block.

Throws

$(D_PSYMBOL SocketException) if unable to receive.

Meta