aboutsummaryrefslogtreecommitdiff
path: root/src/sp/protocol
Commit message (Collapse)AuthorAge
* fixes #2146 need statistics for PUB protocolpub-statsGarrett D'Amore2025-08-10
|
* Fix typos across docs, comments, and CMakemochalins2025-06-02
|
* Converted property functions to use nng_err.Garrett D'Amore2025-04-27
|
* AIO: Use nng_err for cancellation callback instead of int.Garrett D'Amore2025-04-27
| | | | | | This is part of our work to improve type safety/awareness, and also improve debugger support, for NNG error codes. There are still quite a few more but this should help.
* fix source formattingshikokuchuo2025-03-16
|
* req protocol: free msg early if no retriesshikokuchuo2025-03-16
|
* args: Convert nng_opts_parse into a header only library using `nng_args_parse`.Garrett D'Amore2025-01-04
| | | | | | | | The API is identical, except that some names have changed, and this is now a header library in `nng/args.h` - so the core library does not need to carry this code in binaries. Being a header library also means it is not necessary to link against NNG, and it does not include any parts of NNG; it only depends on a standard C99 or C11 environment.
* api: remove old protocol headersGarrett D'Amore2025-01-04
|
* api: rename nng_send_aio and nng_recv_aio to nng_socket_send and nng_socket_recvGarrett D'Amore2025-01-04
| | | | This aligns more closely with the nng_ctx functions.
* protocols: move content from the protocols to nng.hGarrett D'Amore2025-01-01
| | | | | This should simplify things for developers. Just one header to include in most cases now.
* socket: rename nng_close to nng_socket_closeGarrett D'Amore2024-12-31
|
* pipeline: use nni_aio_startGarrett D'Amore2024-12-26
|
* sub: remove some calls to nni_aio_beginGarrett D'Amore2024-12-26
|
* pair0: use nni_aio_startGarrett D'Amore2024-12-26
|
* pair1: use nni_aio_startGarrett D'Amore2024-12-26
|
* pub sub: use nni_aio_startGarrett D'Amore2024-12-26
|
* bus: use nni_aio_startGarrett D'Amore2024-12-26
| | | | | | The test needed a change to ensure that we do not trigger a debugging check (you cannot submit another job on an aio that you've been notified is stopped via NNG_ESTOPPED.)
* req rep: use nni_aio_startGarrett D'Amore2024-12-26
|
* survey protocol conversion to nni_aio_startGarrett D'Amore2024-12-26
|
* aio: introduce NNG_ESTOPPEDGarrett D'Amore2024-12-26
| | | | | | | | | | | This error code results when an AIO is stopped permanently, as a result of nni_aio_close or nni_aio_stop. The associated AIO object cannot be used again. This discrimantes against a file being closed, or a temporary cancellation which might allow the aio to be reused. Consumers must check for this error status in their callbacks, and not resubmit an operation that failed with this error. Doing so, will result in an infinite loop of submit / errors.
* ctx: Simplify handling for closed contexts.Garrett D'Amore2024-12-07
| | | | | | Once a context has started the process of close, further attempts to close it will return NNG_ECLOSED. What was I thinking to ever do anything else?
* fixes #1959 Occasional SIGSEGV in nng_recv_aio() on a respondent socketAleksei Solovev2024-12-07
|
* tests: req stress test converted to NUTSGarrett D'Amore2024-11-30
|
* tests: fix data race getting resultsGarrett D'Amore2024-11-30
|
* refactor initialization/finalizationGarrett D'Amore2024-11-11
| | | | | | | | | Applications must now call nng_init(), but they can supply a set of parameters optionally. The code is now safe for multiple libraries to do this concurrently, meaning nng_fini no longer can race against another instance starting up. The nni_init checks on all public APIs are removed now.
* Remove untyped nng_socket_get and nng_socket_set.Garrett D'Amore2024-11-03
|
* Add some more tests for sub coverage.Garrett D'Amore2024-11-03
|
* Replace NNG_OPT_SUB_SUBSCRIBE/UNSUBSCRIBE with functions.Garrett D'Amore2024-11-03
| | | | | The main purpose is to eliminate the NNI_TYPE_OPAQUE options, by putting these into their own first class, protocol-specific, functions.
* Replace `NNG_OPT_RAW` with `nng_socket_raw`.Garrett D'Amore2024-11-02
| | | | Similar to the other identities, this simplifies code a bit.
* Replace `NNG_OPT_PROTO`, `NNG_OPT_PROTONAME`, and friends with functions.Garrett D'Amore2024-11-02
| | | | | | Socket options were a little awkward, and these are core properties of the socket. Few if any applications need these. This also avoids some dynamic allocations.
* NNG_OPT_RECVFD and NNG_OPT_SENDFD converted to functions.Garrett D'Amore2024-11-02
| | | | | | | | | | These options are removed entirely, and their functionality is now available via special functions, `nng_socket_get_send_poll_fd` and `nng_socket_get_recv_poll_fd`, making these first class methods on the socket. This eliminates a bit of wasteful code, and provides type safety for these methods.
* Use `const` for nng_stat when possible.Garrett D'Amore2024-10-20
| | | | | This should help the compiler enforce checks, and may result in better optimizations.
* Log protocol connections rejected by protocol.Garrett D'Amore2024-04-14
|
* Add support for socket:// in NUTS marry function.Garrett D'Amore2024-02-18
| | | | | This also adds a HUGE test for REP using socket so that we can discriminate failures that might exist using sockets instead of inproc.
* Add REP huge reply (10MB) testGarrett D'Amore2024-02-18
|
* fixes #1740 Public ID hash APIGarrett D'Amore2023-12-29
| | | | | | | | | 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.
* fixes #1728 surveyor could be simplified to not use timerGarrett D'Amore2023-12-17
|
* minor comment fixes for survey_testGarrett D'Amore2023-12-17
|
* fixes #1663 Request/Reply Protocol Throughput and ScalabilityGarrett D'Amore2023-12-16
| | | | | | | | | | | | | | | 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.
* fixes #1702 segfault canceling req receive while sendingGarrett D'Amore2023-11-25
|
* req: use nni_aio_completions - this is similar to #1523Garrett D'Amore2023-11-25
|
* fixes #1523 rare SEGV in sub nni_list_removeGarrett D'Amore2023-11-25
| | | | | | | | | | | | Credit goes to Wu Xuan (@willwu1217) for diagnosing and proposing a fix as part of #1695. This approach takes a revised approach to avoid adding extra memory, and it also is slightly faster as we do not need to update both pointers in the linked list, by reusing the reap node. As part of this a new internal API, nni_aio_completions, is introduced. In all likelihood we will be able to use this to solve some similar crashes in other areas of the code.
* fix: use ifdef for NNG_TEST_LIBMarco Casaroli2023-11-25
| | | | | | | In some places, we use ifdef, and others if. This normalizes for always using ifdef, so we can compile when this macro is not defined.
* Fix PAIR v0 not finalizing the pollables when closing socket (#1640)Ricardo Catalinas Jiménez2023-02-05
| | | | This function needs to be pretty much identical between PAIR v0 and v1, it was missing just the call to release the pollable resources.
* Fixes for some security complaints.Garrett D'Amore2022-12-31
| | | | | | | None of these changes are actual security bugs, but GitHub's scanner reports false positives at Critical severity for them. (There are a number of complaints from that scanner, many of which we do not necessarily agree with.)
* don't use deprecated functions in tests (#1560)Edward Rudd2021-12-29
|
* Bus socket converted to use lmq.Garrett D'Amore2021-12-27
| | | | | | | | | | This should give significant performance boosts to anyone using this protocol. Buffering on both the send and receive side is supported, with a default buffer size of 16 messages. This should help provide a reasonable default case for most users. While here updated the test for bus to much more complete NUTS style test framework, with increased coverage.
* Socket and context initialization never fails.Garrett D'Amore2021-12-25
| | | | | This makes these functions entirely bullet proof, and eliminates yet more error handling cases.
* Provide a tiny buf for lmq buffer by default.Garrett D'Amore2021-12-25
| | | | | This allows us to make nni_lmq_init() non-failing. (Although the buffer size requested at initialization might not be granted.)
* Pollables can be completely inline.Garrett D'Amore2021-12-25
| | | | | This eliminates more failure paths, and brings us still closer to eliminating the possibility of failure during socket init.