| 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.
|
| | |
|
| | |
|
| |
|
|
|
|
| |
This includes changes to support setting the sanitizer *correctly*
(the old code CMake stuff didn't quite get it right), and addresses
a number of failures in the test code found by the address sanitizer.
|
| | |
|
| | |
|
| |
|
|
|
|
| |
This reference counts both TCP and IPC dialers running on POSIX
configurations, as we need to take care not to destroy the dialer
until any streams associated with are completely destroyed.
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| |
|
|
|
| |
This also introduces a more efficient reference counting usage based
on atomics, rather than locks.
|
| | |
|
| |
|
|
|
| |
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
|
| | |
|
| | |
|
| |
|
|
|
|
| |
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.
|
| |
|
|
|
|
| |
Define a InterlockedAddNoFence64() function using gcc's atomics on
mingw(32|64)
(https://gcc.gnu.org/onlinedocs/gcc/_005f_005fatomic-Builtins.html)
|
| | |
|
| | |
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
| |
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
|
| | |
|
| |
|
|
|
| |
before: nni_file_is_dir with path D:\\ D:/ D: all returns false
after: nni_file_is_dir with path D:\\ D:/ D: all returns true
|
| | |
|
| |
|
|
|
|
|
|
|
| |
Basically, we can ignore EV_EOF, as we wind up still alerting
the corresponding events. EV_ERROR we still treat as HUP.
(The EV_EOF was responsible for prematurely closing the socket
and aborting transactions while there was still data in the socket
buffers.)
|
| | |
|
| | |
|
| |
|
|
|
| |
This also fixes a leaked TCP connection on a failure path, which we
noticed while working this change.
|
| | |
|
| | |
|
| |
|
|
|
|
|
|
|
| |
This changes the signature of the aio cancellation routines
to take the argument for cancellation directly, so we do not
need to lookup the argument using the nni_aio_get_prov_data.
We should probably consider eliminating nni_aio_get_prov_data,
and co, and changing the prov_extra to reflect prov_data. Later.
|
| |
|
|
|
|
|
| |
The POLLHUP (or rather EPOLLHUP) flag does not quite mean the same
thing in Linux, and we've seen random failures where we will sometimes
get this event on a socket that is freshly connected. This might be
a bug in Linux, but it is easy enough to workaround -- we just don't
watch for it at all.
|
| |
|
| |
fixed compilation error on OpenBSD, missing sockpeercred
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
fixes #622 incorrect assumptions about malloc(0)
Windows actually allocates an object of size zero when calling
malloc on size zero. This is unusual behavior, and we just
add logic to work more like malloc on POSIX systems.
Other systems can return non-NULL objects to fixed pages here.
We think the best option here is to uniformly return NULL from
our APIs in these circumstances, and to include testing to validate
that.
|
| |
|
|
|
| |
This changeset needs work. We are seeing errors described by
This reverts commit d7f7c896c0ede24249ef63b1e45b1878bf4bd473.
|
| |
|
|
|
|
|
|
|
|
| |
fixes #208 pipe start should occur before connect / accept
fixes #616 Race condition closing between header & body
This refactors the transports to handle their own connection
handshaking before passing the pipe to the socket. This
changes and simplifies the setup. This also fixes a rather
challenging race condition described by #616.
|