NNGSocket.receivebuf

Receives a data buffer of the max size data.length

struct NNGSocket
@nogc @safe nothrow
size_t
receivebuf
(
ubyte[] data
,
size_t sz = 0
,
bool nonblock = false
)
in (data.length)

Parameters

data ubyte[]

preallocated buffer

nonblock bool

set the non blocking mode

sz size_t

if sz != the this sz is used as max size

Return Value

Type: size_t

number of actually received bytes or -1