SocketReader.popFront

Discard the current item (front) and process the next field

This will change the current front. If not enough data is available, and a non-null socket is provided, it will attempt to read as much as possible data from this socket.

struct SocketReader(size_t MAX_FIELD_SIZE = 512, size_t FIELDS = 16)
ssize_t
popFront
(
ISocket socket = null
,
int flags = 0
)

Parameters

socket ISocket

If non null, instead of becoming empty, popFront will attempt to read data from the socket

flags int

Flags to pass to recv in the event of a read from socket

Return Value

Type: ssize_t

The amount of data read from the network, if any (recv return value)

Throws

ErrnoException if recv returned a negative value

Meta