[nanomsg] Notice for legacy libnanomsg users on Windows

  • From: "Garrett D'Amore" <garrett@xxxxxxxxxx>
  • To: "nanomsg@xxxxxxxxxxxxx" <nanomsg@xxxxxxxxxxxxx>
  • Date: Tue, 17 Apr 2018 00:28:59 +0000

If you’re using Windows and libnanomsg together, you should like a change I
just integrated into libnanomsg, and will be in the next formal release of
libnanomsg.

libnanomsg no longer uses a fixed TCP port to use for the pollable file
descriptors (NN_SNDFD and NN_RCVFD options), and won’t conflict with itself
— so no more global mutex.  Instead it uses a randomly selected ephemeral
port (selected by the operating system, not the library), so it always
works.

One side effect of this is that you may notice loopback descriptors that
used be bound to TCP 5907 are now random.  This is normal and expected.
Extra care has been taken to prevent someone else from hacking into these,
so they should be immune to both remote and local malfeasance.

Anyway, if you’re firewalling localhost (loopback only) you may have to
open it up, because we no longer use a fixed TCP port.

(Btw, this approach is also used in libnng on Windows, but only if you ask
for these pollable descriptors for use with select() or WSApoll.  And we
really really recommend you don’t do that — aio is *so* much better and
more natural on this platform…

  - Garrett

Other related posts:

  • » [nanomsg] Notice for legacy libnanomsg users on Windows - Garrett D'Amore