Socket.recv

recv data from a connected socket

Can be used on unconnected sockets as well, but then it is not possible to know who the sender was.

struct Socket
@trusted @nogc
ssize_t
recv

Parameters

buffer void[]

the buffer range to send

flags int

flags argument as defined for the standard socket recv

timeout Timeout

how long to wait for data

Return Value

Type: ssize_t

The number of bytes actually received

Throws

May throw an ErrnoException in case of error

Will throw TimeoutExpired if the timeout expired

Meta