final int received = NativeLibrary.nn_recv(socket, ptrBuff, Nanomsg.constants.NN_MSG, blocking ? 0: Nanomsg.constants.NN_DONTWAIT);
if (received < 0) {
final int errno = Nanomsg.getErrorNumber();
final String msg = Nanomsg.getError();
throw new IOException(msg, errno);
}
final Pointer result = ptrBuff.getValue();
final byte[] bytesResult = result.getByteArray(0, received);