Skip to content

v3.3.0

Compare
Choose a tag to compare
@reqshark reqshark released this 14 Mar 21:35
· 33 commits to master since this release

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 mode
  • false 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: