| Commit message (Collapse) | Author | Age |
| | |
|
| |
|
|
|
|
|
|
|
| |
We accidentally made idhash not public by not publishing its header
in the right place. This is really generic utility stuff, so we
have posted it in the nng/supplemental/util/ directory.
We've also removed the ability to remove this -- its a very small amount
of additional code, as its just a wrapper on top of mandatory functionality.
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
This transport only listens, and creates connections when
the application calls setopt on the lister with NNG_OPT_SOCKET_FD,
to pass a file descriptor. The FD is turned into an nng_stream,
and utilized for SP. The protocol over the descriptor is identical
to the TCP protocol (not the IPC protocol).
The options for peer information are borrowed from the IPC transport,
as they may be useful for these purposes.
This includes a test suite and full documentation.
|
| | |
|
| |
|
|
|
|
| |
This also exposes an nng_thread_set_name() function for
applications to use. All NNG thread names start with "nng:".
Note that support is highly dependent on the operating system.
|
| |
|
|
|
|
|
| |
fixes #1080 Desire better way to access statistics for NNG objects
We've also added a test that uses some of this, in order to verify
that the req protocol rejects invalid peers.
|
| | |
|
| |
|
|
|
|
|
| |
This introduces a basic IPC API, modeled on the TCP API, for direct access.
Only connection options are exposed at present -- we need to add options
for dialers and listeners (and particularly listener settings for
permissions and security attributes.) Documentation is still outstanding,
but a very limited test suite exists.
|
| |
|
|
|
|
|
|
|
|
| |
This change makes embedding nng + nggpp (or other projects depending on
nng) in cmake easier. The header files are moved to a separate include
directory. This also makes installation of the headers easier, and
allows clearer identification of private vs public heade files.
Some additional cleanups were performed by @gedamore, but the main
credit for this change belongs with @gregorburger.
|
| |
|
|
|
|
|
|
|
|
|
| |
This is a significant refactor of the library configuration.
We use the modern package configuration helper, with a template
script that also does the find_package dance for any of our
dependencies.
We also have restructured the code so that most protocols and
transports have their configuration isolated to their own CMakeLists
file, reducing the size of the global CMakeLists file.
|
| | |
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The fix for #715 to address const is still not quite right.
In ISO C, the argv array is just char **. getopt() in POSIX uses
char *const[]. That part is right, but we should then not pass
const char ** in calls. Furthermore, really the optarg should also
not be constified.
This aligns us closer to getopt() and leads to the fewest problems.
This does represent a slight breaking change, but as old code should
still compile and run, we don't think we should bump the API version
for this change. Furthermore, we don't think anyone else is actually
using this API yet.
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
fixes #397 Need to cast zoneid
fixes #395 sun is predefined on illumos/Solaris
fixes #394 alloca needs to #include <alloca.h>
fixes #399 Cannot use SVR4.2 specific msghdr
fixes #402 getpeerucred needs a NULL initialized ucred
fixes #403 syntax error in posix_tcp - attempt to return void
fixes #407 illumos getegid wrong
fixes #406 nni_idhash_count is dead code
fixes #404 idhash typedef redeclared
fixes #405 warning: newline not last character in file
This is basically a slew of related bug fixes required to make this
work on illumos. Note that the fixes are not "complete", because
more work is required to support port events given that epoll is busted
on illumos.
We also fixed a bunch of things that aren't actually "bugs" per se, but
really just warnings. Silencing them makes things better for everyone.
Apparently not all compilers are equally happy with redundant (but
otherwise identical) typedefs; we use structs in some places instead of
shorter type names to silence these complaints.
Note that IPC permissions (the mode bits on the socket vnode) are not
validated on SunOS systems. This change includes documentation to reflect
that.
|
| |
|
|
|
|
| |
This includes platform portability stuff like mutexes and threads,
etc. While here we fixed a problem with nng_opts_parse and we
addressed the type of the platform API.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This is intended to provide compatibility with, and has been tested
against, legacy nanocat. There are a few differences though.
At this time support for the alias names (where argv[0] is set to
something like nngreq or somesuch) is missing.
By default this library operations without NNG_FLAG_NONBLOCK on
dial and listen, so that failures here are immediately diagnosable.
(This behavior can be changed with the --async flag.)
By default --pair means PAIRv1, but you can specify --pair0
or --pair1 explicitly. (There is also a --compat mode, and in
that mode --pair means PAIRv0. The --compat mode also turns on
NNG_FLAG_NONBLOCK by default.)
The "quoted" mode also quotes tabs. (Legacy nanocat did not.)
It is possible to connect to *multiple* peers by using the --dial
or --listen (or similar) options multiple times.
Shorthands can be used for long options that are not ambiguous. For
example, --surv can be used to mean surveyor, but --re is invalid because
it can mean req, rep, or respondent.
We assume you have a reasonable standard C environment. This won't work
in embedded environments without support for FILE *.
TLS options are missing but to be added soon.
A man page is still to be written.
|
| |
|
|
|
|
|
|
|
|
|
| |
We have implemented this alternative to getopt() so that we can
create nngcat. The reason we did not just use getopt() is that
getopt() does not understand long options (which nanocat uses, and
we want to preserve for compatibility) and getopt() is not available
on Windows (and possibly other non-POSIX platforms.)
This function handles long and short options, but does not have support
for option clustering. It also is threadsafe & reentrant, unlike getopt.
|
| |
|
|
|
|
|
|
|
| |
These are incremental updates... we avoid using install() in the
subdirectories, so that we can adapt properly to them in the
single parent directory.
We have started some of the work to improve support for CPack. This
is still not yet done, but work in progress.
|
|
|
This introduces portable primitives for time, random numbers,
synchronization primitives, and threading. These are somewhat
primitive (least common denominiators), but they can help with writing
portable applications, especially our own demo apps.
|