aboutsummaryrefslogtreecommitdiff
path: root/src/core
Commit message (Collapse)AuthorAge
...
* fixes #844 WebSocket wildcard host errorsGarrett D'Amore2020-07-27
| | | | | | | | | | fixes #1224 wss fails on IPV6 address This fixes bugs and inconsistencies in the way addresses are handled for HTTP (and consequently websocket). The Host: address line needs to look at numeric IPs and treat wildcards as if they are not specified, and needs to understand the IPv6 address format using brackets (e.g. [::1]:80).
* fix #1252jeikabu2020-06-16
| | | | - nng_msg_clear should only clear the message body and not the head. Add test to verify
* fixes #1230 NNG_OPT_RECONNMAXT zero does not prevent exponential back-offGarrett D'Amore2020-05-24
|
* fixes #1239 Use after free in tlsGarrett D'Amore2020-05-23
| | | | | Also, addressed a number of Clang-tidy complaints. Potential hangs in close addressed as well.
* fixes #1236 Deadlock triggered on nng_closeGarrett D'Amore2020-05-17
| | | | fixes #1219 nng_close occasionally hang on Windows
* fixes #1171 message header could be inlined in the message structureGarrett D'Amore2020-02-26
| | | | | This uses a maximum 64-byte header and should avoid allocations and cache misses, leading to a small performance boost overall.
* fixes #1202 More than 120 threads was started by NNGGarrett D'Amore2020-02-24
| | | | | | | | This introduces a new CMake option, NNG_MAX_TASKQ_THREADS, with a default value of 16. The number of taskq workers will generally be calculated as vcpu * 2. This new value, if not zero, sets an upper bound. Note that the value should be at least two, in order to ensure no deadlocks occur.
* fixes #1005 TLS 1.3 supportGarrett D'Amore2020-02-23
| | | | | | | | This introduces support for an external wolfSSL plugin, and generally creates the framework for pluggable TLS implementations. The wolfSSL engine is provided via an external module (git submodule), available either under a GPLv3 license or a commercial license.
* Fix typos in commentsEvgeny Ermakov2020-02-13
|
* fixes #814 mq_get_error should goGarrett D'Amore2020-02-06
|
* Fix possible use after freeEvgeny Ermakov2020-02-05
|
* fixes #1169 survey and xsurvey could use message cloningGarrett D'Amore2020-01-20
| | | | | | | | | | | fixes #1160 Consider limiting maximum hop count to 15 fixes #1098 Maximum maxTTL should be compile time defined This doesn't expose the max-MaxTTL in the CMakeList.txt -- there is really no reason anyone should be changing it. This does not yet inline the message header into the nni_msg_t, but it is my intention to do so soon, and eliminate most of the conditional cases for failure on inserting into the header.
* fixes #1156 Message cloning could help reduce copies a lotGarrett D'Amore2020-01-20
| | | | | | | | | | | | This introduces reference counting on messages to reduce the data copies. This should have a marked improvement when moving large messages through the system, or when publishing to many subscribers. For some transports, when using large messages, the copy time can be the dominant factor. Note that when a message is actually shared, inproc will still perform an extra copy in order to ensure that it can modify the headers. This will unfortunately always be the case with REQ, as the REQ protocol keeps a copy of the original message so it can retry.
* fixes #1145 nng_msg options should be removedGarrett D'Amore2020-01-19
|
* fixes #1132 Masking error in LMQ leads to corruptionGarrett D'Amore2020-01-12
|
* XREQ and others race on TTL.Garrett D'Amore2020-01-11
| | | | | | | | | | The TTL in these cases should have been atomic. To facilitate things we actually introduce an atomic int for convenience. We also introduce a convenience nni_msg_must_append_u32() and nni_msg_header_must_append_u32(), so that we can eliminate some failure tests that cannot ever happen. Combined with a new test for xreq, we have 100% coverage for xreq and more coverage for the other REQ/REP protocols.
* fixes #1094 Consider in-lining task and aioGarrett D'Amore2020-01-08
| | | | | This only does it for rep, but it also has changes that should increase the overall test coverage for the REP protocol
* fixes #1117 task structures should be inlinedGarrett D'Amore2020-01-06
|
* fixes #1116 task_reap can be eliminatedGarrett D'Amore2020-01-05
|
* fixes #1096 inline all 16 iovs in aio (also consider reducing -- to 8?)Garrett D'Amore2020-01-04
| | | | fixes #1097 aio prov_data not used at all
* fixes #1105 pollable can be inlined, and use atomicsGarrett D'Amore2020-01-04
| | | | | This also introduces an nni_atomic_cas64 to help with lock-free designs. Some mechanical renaming was done in some of the protocols for spelling.
* fixes #1104 move allocation of protocol objects to common coreGarrett D'Amore2020-01-03
| | | | fixes #1103 respondent could inline backtrace
* fixes #1090 nni_strlcat is unusedGarrett D'Amore2020-01-02
|
* fixes #1083 Random number improvementsGarrett D'Amore2020-01-01
|
* Fixup a few codacy complaints.Garrett D'Amore2020-01-01
|
* fixes #1081 Use after free possible in statsGarrett D'Amore2020-01-01
| | | | | | | fixes #1080 Desire better way to access statistics for NNG objects We've also added a test that uses some of this, in order to verify that the req protocol rejects invalid peers.
* fixes #1075 WebSocket heap use after freeGarrett D'Amore2019-12-30
| | | | | This also introduces a new atomic boolean type, so we can use that to trigger whether we've added the HTTP handler or not.
* Fix compilation errors and warnings when NNG_ENABLE_STATS is OFFRobert Bielik2019-12-30
|
* fixes #1064 Potential deadlock in statistics codeGarrett D'Amore2019-12-29
| | | | | | | | 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.
* Silence a few clang-tidy complaints.Garrett D'Amore2019-12-29
|
* fixes #1051 nni_ntop is unusedGarrett D'Amore2019-12-27
|
* Address complaints found by lgtm.com.Garrett D'Amore2019-12-11
|
* fixes #1004 Warning found by clang --analyzeGarrett D'Amore2019-11-11
| | | | | It's possible for an empty chunk to have a NULL data pointer. Even when copying zero bytes, this makes clang somewhat unhappy.
* fixes #954 large message fails with no error messageGarrett D'Amore2019-07-17
| | | | | | 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.
* fix #946 Use after free in TLSGarrett D'Amore2019-05-19
| | | | | This also introduces a more efficient reference counting usage based on atomics, rather than locks.
* Add uint64 to generated legacy nng_setopt_* functions.Cody Piersall2019-05-17
| | | | | | 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.
* Introduce nni_plat_printf()Garrett D'Amore2019-05-07
| | | | | This permits the stats dump to avoid some extra buffering, and resolves a complaint about possible format buffer overruns.
* fixes #934 idhash should be a bit more robustGarrett D'Amore2019-04-24
|
* fixes #931 nng_ctx_send can block foreverNathan Kent2019-04-24
|
* fixes #901 shorter option get/set functions for all typesJake Woltersdorf2019-04-07
| | | | | | | | | | | | - 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
* fixes #815 Eliminate socket filters on message queuesGarrett D'Amore2019-03-13
| | | | | | | 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.
* nng_msg_dup correctly duplicates pipe (mentioned in #862)Jake Woltersdorf2019-03-12
|
* Add stream.*_get_string implementationJake Woltersdorf2019-03-03
|
* fixes #461 Context support for SUBGarrett D'Amore2019-02-26
| | | | | | | | | | | | | | | | | | 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 #892 remove statistics from message queuesGarrett D'Amore2019-02-23
|
* fixes #848 server hang waiting for client handshakeGarrett D'Amore2019-02-23
| | | | | | | | | | | | | | | | | | | | | | | 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.
* fixes #879 Desire NNG_OPT_TCP_BOUND_PORTGarrett D'Amore2019-02-16
| | | | | | 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.
* fixes #872 create unified nng_stream APIGarrett D'Amore2019-02-16
| | | | | | | | | 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.
* fixes #839 TCP listener_start API should use constant sockaddrGarrett D'Amore2019-01-06
|
* fixes #852 Eliminate pipe p_options and use new style getoptGarrett D'Amore2019-01-06
|