[nanomsg] Re: Python bindings for nng

  • From: "Garrett D'Amore" <garrett@xxxxxxxxxx>
  • To: nanomsg@xxxxxxxxxxxxx
  • Date: Mon, 12 Mar 2018 18:41:30 +0000

Cool!

NNG_DECL is used only on Windows really, and is only needed for APIs that
are exposed to applications.  So this includes some header files, but only
those that would normally be “installed” where a user application could
link against them.

The headers that need this are:

nng/nng.h
nng/protocol/*/*.h (one per protocol, for nng_xxxx_open() functions)
nng/transport/*/*.h (one per transport). for nng_xxxx_register() functions
nng/supplemental/http/http.h. - extra HTTP functionality
nng/supplemental/tls/tls.h - extra TLS functionality
nng/supplemental/util/options.h - getopt replacements
nng/supplemental/util/platform.h - platform portability functions

Many other header files are internal use only, and do not need these
declarations.

I think I’ve already properly dealt with all of this, so you really
shouldn’t have to worry about it.

It is necessary that applications that include any of those headers include
the nng.h header *first* though, so that they get the right definition for
NNG_DECL.

 - Garrett

On Mon, Mar 12, 2018 at 9:53 AM Vincent Nonnenmacher <
vincent.nonnenmacher@xxxxxxxxx> wrote:

Hi

I have started to adapt Dirkjan Ochtman ‘nnpy’ CFFI bindings to `nng`.

I won’t try to use the ‘compatibility’ first as this is not perhaps a so
great idea
and could be used perhaps with ‘nnpy’ binding.

I’m wondering it there is a need to insert declaration of NNG_DECL
interfaces
and constants found in include/nng subfolders beside ` include/nng/nng.h` ?

It could be usefull to have some more experienced hands as I’m a Ruby (and
Mac)
programer more than a Python (windows) one ;-)



Other related posts: