| Commit message (Collapse) | Author | Age |
| | |
|
| |
|
|
|
| |
This also introduces a new atomic boolean type, so we can use that
to trigger whether we've added the HTTP handler or not.
|
| |
|
|
|
|
|
|
| |
fixes #1063 Include sanitizer runs in CI
fixes #1068 Wssfile test sometimes fails with wrong error code
While here, addressed a number of clang-tidy items, and some light
cleanup of code we were already in.
|
| | |
|
| | |
|
| | |
|
| |
|
|
|
| |
It's possible for an empty chunk to have a NULL data pointer.
Even when copying zero bytes, this makes clang somewhat unhappy.
|
| |
|
|
|
|
| |
This removes the default 1MB limit on maximum receive sizes.
Applications intended for deployment in insecure or hostile
environments should choose a sensible default for NNG_OPT_RECVMAXSZ.
|
| |
|
|
|
| |
This also introduces a more efficient reference counting usage based
on atomics, rather than locks.
|
| |
|
|
|
|
| |
The functions nng_dialer_setopt_uint64 and nng_dialer_setopt_uint64 are
declared in nng.h but not defined, causing errors at runtime of programs
that expect them to be defined.
|
| |
|
|
|
| |
This permits the stats dump to avoid some extra buffering,
and resolves a complaint about possible format buffer overruns.
|
| | |
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
|
| |
- Renamed internal nng_*_getx/setx methods with "nni" prefix
- Moved stream get/set option definition macros to options.h and added "NNI_" prefix
- "_PTR" variant of get/set option definition macros is for when first arg is passed as pointer (`nng_stream *s` vs `nng_pipe s`)
- New get/set option functions for `nng_socket` are `nng_socket_get_X` eschewing the previous `nng_getopt` pattern
- Macro-fy legacy getopt/setopt and implement in terms of "new" API
- nng_setopt* use "new" shorter API. Add missing uint64 set functions.
- Shorter get/set option functions get own man page and old getopt/setopt link to them
- Built with -DNNG_ENABLE_DOC=ON and part of central libnng index
- Update copyright
|
| |
|
|
|
|
|
| |
This also eliminates the enforcement of NNG_OPT_RECVMAXSZ for inproc,
which never really made much sense. This helps inproc go faster.
While here, also clean up the entry point for protocols to support
a drain option, since we don't use that anywhere.
|
| | |
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
fixes #762 Pub/Sub very slow compared with nanomsg
This introduces contexts for SUB, and converts both the cooked SUB
and PUB protocols to use a new lightweight message queue that has
significant performance benefits over the heavy-weight message queue.
We've also added a test program, pubdrop, in the perf directory,
which can be used for measuring pub/sub message rates and drop rates.
Note that its quite easy to overwhelm a subscriber still.
The SUB socket performance is still not completely where it needs to be.
There are two remainging things to improve. Firsst we need to replace
the naive linked list of topics with a proper PATRICIA trie. Second, we
need to work on the low level POSIX poller code. (The Windows code is
already quite good, and we outperform nanomsg on Windows.)
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
fixes #698 Need TCP stats
fixes #699 Need IPC stats
fixes #701 Need TLS stats
This commit addresses a problem when negotiating using one of the stream
based negotiation APIs -- a slow or misbehaving peer can prevent well
behaved ones from establishing a connection. The fix is a fairly
significant change in how these transports link up, and it does rely
on the fact that the socket only has a single accept() or connect()
pending at a time (on a given endpoint that is).
While here, we have completely revamped the way transport statistics are
done, offering a standard API for collecting these statistics.
Unfortunately, this completely borks the statistics for inproc. As we
are planning to change the way inproc works soon, in order to provide
more control and work on performance fixes for the message queue, we feel
this is an acceptable trade-off. Furthermore, almost nobody uses inproc
for anything, and even fewer people are making use of the statistics
at this time.
|
| |
|
|
|
|
| |
We also have made some support changes, including new APIs for printing
URLs, and some improvements to the NNG_OPT_URL to make use of this new
property.
|
| |
|
|
|
|
|
|
|
| |
This is a major change, and includes changes to use a polymorphic
stream API for all transports. There have been related bugs fixed
along the way. Additionally the man pages have changed.
The old non-polymorphic APIs are removed now. This is a breaking
change, but the old APIs were never part of any released public API.
|
| | |
|
| | |
|
| |
|
|
|
| |
While here fixed a spelling error in the description of the global
statistics structure.
|
| |
|
|
|
|
|
|
|
|
|
|
| |
This changes much of the internal API for TCP option handling, and
includes hooks for some of this in various consumers. Note that the
consumers still need to have additional work done to complete them,
which will be part of providing public "raw" TLS and WebSocket APIs.
We would also like to finish addressing the call sites of
nni_tcp_listener_start() that assume the sockaddr is modified --
it would be superior to use the NNG_OPT_LOCADDR option. Thaat will be
addressed in a follow up PR.
|
| |
|
|
|
| |
Some more changes to use nni_type instead of nni_opt_type
are included as well.
|
| |
|
|
|
| |
This also makes some smaller related changes to use the new
nni_type instead of nni_opt_type.
|
| | |
|
| | |
|
| | |
|
| |
|
|
|
|
|
| |
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.
|
| |
|
|
|
| |
* Expose cmake variable to set number of DNS resolver threads: NNG_RESOLV_CONCURRENCY
* Expose cmake variable to set number of taskq threads: NNG_NUM_TASKQ_THREADS
|
| | |
|
| | |
|
| |
|
|
|
|
|
|
|
|
| |
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.
|
| | |
|
| | |
|
| | |
|
| |
|
|
| |
Reported by @TBastiani (with suggested fix). Test validation added.
|
| |
|
|
|
| |
These options are undocumented -- for now. We need to get some
experience with them to ensure that they are worth keeping.
|
| | |
|
| | |
|
| | |
|
| |
|
|
| |
underlying buffer twice under some circumstance, say, sz = 1024 or 2048
|
| | |
|
| | |
|
| | |
|
| | |
|
| |
|
|
| |
fixes #709 idhash bug on duplicate add
|