| Commit message (Collapse) | Author | Age |
| ... | |
| | |
|
| | |
|
| | |
|
| | |
|
| |
|
|
| |
fixes #709 idhash bug on duplicate add
|
| | |
|
| | |
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This introduces new public APIs for obtaining statistics,
and adds some generic stats for dialers, listeners, pipes, and
sockets. Also added are stats for inproc and pairv1 protocol.
The other protocols and transports will have stats added
incrementally as time goes on.
A simple test program, and man pages are provided for this.
Start by looking at nng_stat(5).
Statistics does have some impact, and they can be disabled by
using the advanced NNG_ENABLE_STATS (setting it to OFF, it's
ON by default) if you need to build a minimized configuration.
|
| | |
|
| |
|
|
|
|
| |
We use macros to generate message bodies for each of the various
variants, reducing source code size (but not compiled size). The
documentation is updated to indicate each of these variants.
|
| |
|
|
|
| |
While here we separate out the dialer and listener options, so
that options for tuning connection are only available for listeners.
|
| |
|
|
|
| |
This adds a couple of new methods, and related documentation
and test cases.
|
| |
|
|
|
|
|
|
|
| |
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 both makes new functions available to the core,
and addresses a bug which would have prevented building the
ZeroTier transport on Windows.
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| |
|
|
|
| |
This also fixes a leaked TCP connection on a failure path, which we
noticed while working this change.
|
| | |
|
| | |
|
| | |
|
| |
|
|
|
| |
Well, actually, #506 fixed that, but this fixes the commentary
that indicates otherwise in the code.
|
| | |
|
| |
|
|
|
|
|
|
|
| |
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.
|
| | |
|
| | |
|
| |
|
|
| |
fixes #651 Use after free in websocket
|
| | |
|
| |
|
|
|
|
|
| |
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
|
| | |
|
| | |
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
| |
Actually the problem was in socket core, in particular in the
shutdown code. The socket shutdown is supposed to ensure that
no pipes were present on the socket, so that protocols need not
concern themselves with this. The code unfortunately was busted,
due to an ordering problem compounded by a race condition. This
fixes that, and changes the REQ protocol to avoid the blocking
condition altogether, and sprinkles a few assertions to validate
these rules are being adhered to.
|
| |
|
|
|
|
|
|
|
|
| |
fixes #599 nng_dial sync should not return until added to socket
This reintroduces the changes for the above fixes, building upon the
transport modifications that we have made to eliminate the separate
transport pipe start entry point. It also includes slightly reworked
code during start to put a hold on the pipe when it is created, which
we we drop at the end, hopefully fixing a use-after-free.
|
| | |
|
| | |
|
| | |
|
| | |
|
| |
|
|
|
| |
While here, perform a more aggressive close of the pipe on
reaping (IPC).
|
| | |
|
| | |
|
| |
|
|
|
|
|
|
|
| |
fixes #615 IPC close on Windows leaves handle open
This reintroduces the code to eradicate the separate transport
start function for IPC, as a incremental step towards the full
fix for 599 and 208. It also addresses 615, by including revised
logic for the handling of close.
|
| |
|
|
|
|
| |
This adds a proper boolean condition for the pipe being closed
(removing the unused sending flag), and adds checks for both the
pipe closed and the socket closed flags at key points.
|
| | |
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|