v3.3.0
add socket.dontwait(bool)
option for controlling libnanomsg flag NN_DONTWAIT
socket.dontwait(boolean)
(Function, param: Boolean, default: true
, except PUSH sockets): Sets the NN_DONTWAIT flag, specifying that the operation should be performed in non-blocking mode,
true
for non-blocking modefalse
for blocking mode
Pass no parameter for the socket's current mode.
socket.dontwait(false);
console.log(socket.dontwait()); // false
// or set when socket is started:
require('nanomsg').socket('pub', { dontwait: false });
Special thanks to: