| 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.
|
| | |
|
| |
|
|
| |
`nng_aio_begin()`
|
| | |
|
| | |
|
| |
|
|
| |
While here fixed a number of nits in comments.
|
| | |
|
| | |
|
| | |
|
| |
|
|
|
|
|
|
|
| |
This includes a manual page documenting the entire set of
functions in one step. The hash is 64-bit based for now, to
be maximally flexible. An internal 32-bit convenience for the
common internal use is also provided (not public).
The public API includes a test suite.
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
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 eliminates the req protocols use of nni_timer (and setting
a single timer node per request. This was problematic because it
devolves into O(n^2) as we wind up inserting timer nodes and having
to scan the list for the timer node.
The solution is to use a single scan - stop worrying about insertion,
but instead use a coarse granularity timer (defaults to 1 second)
for retries. Then do the O(n) scan just once per interval.
A new option, NNG_OPT_REQ_RESENDTICK, can be used to change the tick
interval for cases (like unit tests) where more fine grained timing
is required.
|
| | |
|
| | |
|
| |
|
|
|
| |
One must not attempt to use any functions that access the socket
directly from pipe notification callbacks.
|
| | |
|
| | |
|
| |
|
|
|
| |
The documentation for this function had not been updated in a long
time, and reflected behavior that is incorrect.
|
| |
|
|
| |
function name was wrong in the code snippet.
|
| |
|
| |
Co-authored-by: Christian Fischbach <cfischbach@mac.com>
|
| |
|
|
|
|
|
| |
This introduces a new API, nng_aio_busy(), that can be used
to query the status of the aio without blocking.
Some minor documentation fixes are included.
|
| |
|
|
|
| |
Also this fixes problems with uninitialized socket names, and the
socket name stat not being adjusted correctly when set via API.
|
| |
|
|
|
|
| |
This function is like nng_device(), but runs asynchronously.
Also, this fixes #1503 nng_device causes nng_close to blocking
|
| |
|
|
| |
fixes #1535 Desire nng_ctx_sendmsg and nng_ctx_recvmsg
|
| |
|
|
|
|
|
| |
Originally the idea was to better support having the transports
be separate loadable modules. This isn't needed for the builtin
transports, so we make the explicit initialization of them
deprecated, and document it as such.
|
| | |
|
| |
|
|
|
|
|
| |
* Add & document msg_capacity, msg_reserve
* reserve/capacity code style
* Documentation references to reserve/capacity
|
| | |
|
| | |
|
| | |
|
| | |
|
| |
|
|
|
|
|
|
|
|
| |
This refactors the pipeline protocol to use lightweight mq
instead of the more expensive message queue structure. It
also provides nicer backpressure and buffering support.
The test suite was updated and converted to NUTS as well.
This won't completely close the gap, but it should help quite
a bit.
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This is a sweeping cleanup of the transport logic around options,
and also harmonizes the names used when setting or getting options.
Additionally, legacy methods are now moved into a separate file and
can be elided via CMake or a preprocessor define.
Fundamentally, the ability to set to transport options via the socket
is deprecated; there are numerous problems with this and my earlier
approaches to deal with this have been somewhat misguided. Further
these approaches will not work with future protocol work that is
planned (were some options need to be negotiated with peers at the
time of connection establishment.)
Documentation has been updated to reflect this. The test suites still
make rather broad use of the older APIs, and will be converted later.
|
| | |
|
| |
|
|
|
|
| |
This should reduce the amount of copying, and the overall size
used by pipes and other objects quite a bit. (On my system, the
sizeof nni_pipe shrank by 400 bytes, for example.)
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
fixes #1326 Linux IPC could use fchmod
fixes #1327 getsockname on ipc may not work
This introduces an abstract:// style transport, which on Linux
results in using the abstract socket with the given name (not
including the leading NULL byte). A new NNG_AF_ABSTRACT is
provided. Auto bind abstract sockets are also supported.
While here we have inlined the aios for the POSIX ipc pipe
objects, eliminating at least one set of failure paths, and
have also performed various other cleanups.
A unix:// alias is available on POSIX systems, which acts just
like ipc:// (and is fact just an alias). This is supplied so
that in the future we can add support for AF_UNIX on Windows.
We've also absorbed the ipcperms test into the new ipc_test suite.
Finally we are now enforcing that IPC path names on Windows are
not over the maximum size, rather than just silently truncating
them.
|
| | |
|
| | |
|
| |
|
|
|
|
|
| |
This adds new options, NNG_OPT_WS_SEND_TEXT and NNG_OPT_WS_RECV_TEXT
that permit communication with WebSocket peers that insist on using
TEXT frames (stream mode only). The support is limited, as NNG does
no validation of the frame contents to check for UTF-8 compliance.
|
| |
|
|
|
|
| |
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 #1277 FreeBSD errors due to bad v4 vs. v6 assumptions
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| |
|
|
|
| |
NNG is always a noun, never an adjective, and should always
be capitalized. We also reduced some unnecessary usages of it.
|