[nanomsg] more nng API changes

  • From: "Garrett D'Amore" <garrett@xxxxxxxxxx>
  • To: "nanomsg@xxxxxxxxxxxxx" <nanomsg@xxxxxxxxxxxxx>
  • Date: Wed, 01 Nov 2017 00:42:37 +0000

Hi all,

A few things coming down… (if you’re not testing nng yet, you can ignore
this).

a) I’ve already removed the nng_peer() and nng_protocol() are gone.
Further, I’ve moved the protocol numbers away too — you don’t need them.

b) Coming soon, protocols and transports will be modularized — the
“protovers” branch carries my work in progress here.  Basically you can
compile-time enable each of these things (everything except zerotier is
on-by-default), so you can make a smaller library (e.g. for tiny
environments.)

c) The protocols and transports are gaining their own header files, e.g.
for pairv1 you do #include <nng/protocol/pair1/pair.h>   This way I don’t
have to have knowledge of the protocols in the core anywhere (other than
cmake files).  It also lets me supply “default” version independent APIs
nicely.  E.g. in the pairv1 header nng_pair_open() is defined to
nng_pair1_open, but in the v0 header it is nng_pair0_open.  (These are
conditionalized so you *can* include both headers, but then you had best
manually choose because the first one #included “wins” in defining the
default.)

Anyway, stay tuned for more.

 - Garrett

Other related posts: