summaryrefslogtreecommitdiff
path: root/src
Commit message (Collapse)AuthorAge
* Bump version to 0.8.0.0.8.0Garrett D'Amore2018-04-12
|
* We need to declare the TLS structure here.Garrett D'Amore2018-04-11
| | | | | Applications which may not even be using TLS should not have to know about the TLS configuration structure.
* fixes #338 possible SIGPIPE on LinuxGarrett D'Amore2018-04-10
|
* Fix valgrind warning in assert.Garrett D'Amore2018-04-10
| | | | | | | This technically doesn't need the lock, as we're only trying to catch a possible problem during development rather than in the field (and this should never occur), but the false positive in valgrind obscures other possible errors, so leave it in the lock.
* Eliminate possible data race on file descriptor.Garrett D'Amore2018-04-10
| | | | Turns out that shutdown is sufficient for most needs.
* fixes #336 inproc queue depths are too longGarrett D'Amore2018-04-10
|
* fixes #334 Separate context for state machines from socketsGarrett D'Amore2018-04-10
| | | | | | | | | | | | | | | This provides context support for REQ and REP sockets. More discussion around this is in the issue itself. Optionally we would like to extend this to the surveyor pattern. Note that we specifically do not support pollable descriptors for non-default contexts, and the results of using file descriptors for polling (NNG_OPT_SENDFD and NNG_OPT_RECVFD) is undefined. In the future, it might be nice to figure out how to factor in optional use of a message queue for users who want more buffering, but we think there is little need for this with cooked mode.
* fixes #335 eventfd seems unreliable on Linux (Ubuntu 17.10)Garrett D'Amore2018-04-09
|
* fixes #331 replace NNG_OPT_RAW option with constructorGarrett D'Amore2018-04-04
| | | | | | | | | | | | | This makes the raw mode something that is immutable, determined at socket construction. This is an enabling change for the separate context support coming soon. As a result, this is an API breaking change for users of the raw mode option (NNG_OPT_RAW). There aren't many of them out there. Cooked mode is entirely unaffected. There are changes to tests and documentation included.
* fixes #329 type checking not done for setoptGarrett D'Amore2018-04-04
|
* fixes #324 nni_aio_set_synch leads to race conditionGarrett D'Amore2018-04-04
| | | | | | | | fixes #325 synchronous aio completion crash fixes #327 move nni_clock() operations to outside the nni_aio_lk. This work was done for the context tree, and is necessary to properly enable that branch.
* fixes #312 idhash_walk stuff can be removedGarrett D'Amore2018-03-30
|
* fixes #323 aio's iov may be reusedGarrett D'Amore2018-03-30
|
* fixes #322 epoll implementation is racyGarrett D'Amore2018-03-30
| | | | | This uses numeric identifiers and an idhash table to make sure that the values we get back are still use.
* fixes #315 WebSocket message handling errorsGarrett D'Amore2018-03-30
| | | | | This also gives a performance benefit to WebSocket, by making the completion logic run synchronously.
* If timeout is NNG_TIME_NEVER, then simply deschedule.Garrett D'Amore2018-03-30
|
* fixes #317 TLS, TCP, and IPC should support multiple outstanding opsGarrett D'Amore2018-03-30
| | | | | | | | | | | | | | | | | | | | | | | | fixes #22 Consider using synchronous completions sometimes Transport improvements for IPC, TCP, and TLS. This change does three things. First it permits multiple outstanding receives or sends on the transport. This change is being made to accomodate some other changes in the protocols where it might be advantageous to post send or receives directly against the transport pipe without going through another level of indirection. Second, it changes the normal completions to be performed synchronously. This translates into a rather major performance improvement, reducing latency by some 27%, and thereby improving performance altogether. (This elminates two extra context switches per transaction!) FInally, we can save some extra checks and conditions because we know that completions cannot happen if we don't have a pending operation (we no longer complete out of sequence), and we only call the dosend operation when we have something to send. This can eliminate some pipeline stalls.
* fixes #316 nni_aio_set_synch() usually doesn't do anythingGarrett D'Amore2018-03-30
|
* fixes #318 Assertion on macOS -- kevent() returns EINPROGRESS.Garrett D'Amore2018-03-30
|
* Add documentation for supplemental functions.Garrett D'Amore2018-03-22
| | | | | | This includes platform portability stuff like mutexes and threads, etc. While here we fixed a problem with nng_opts_parse and we addressed the type of the platform API.
* fixes #301 String option handling for getoptGarrett D'Amore2018-03-20
|
* fixes #296 Typed options should validate option typeGarrett D'Amore2018-03-20
| | | | | | | | | | | | | fixes #302 nng_dialer/listener/pipe_getopt_sockaddr desired This adds plumbing to pass and check the type of options all the way through. NNG_ZT_OPT_ORBIT is type UINT64, but you can use the untyped form to pass two of them if needed. No typed access for retrieving strings yet. I think this should allocate a pointer and copy that out, but that's for later.
* Fixes issues found by (and submitted by) @nonnenmacher when workingVincent Nonnenmacher2018-03-19
| | | | | | | on a python wrapper (cffi). Mostly this is fixing inconsistencies in our public API and the actual implementation.
* Bump API to 0.7.0.0.7.0Garrett D'Amore2018-03-18
|
* fixes #295 boolean options should use C99 bool typeGarrett D'Amore2018-03-18
| | | | | | | | | | | fixes #275 nng_pipe_getopt_ptr() missing? fixes #285 nng_setopt_ptr MIS fixes #297 nng_listener/dialer_close does not validate mode This change adds some missing APIs, and changes others. In particular, certain options are now of type bool, with size of just one. This is a *breaking* change for code that uses those options -- NNG_OPT_RAW, NNG_OPT_PAIR1_POLY, NNG_OPT_TLS_VERIFIED.
* fixes #287 remove NNG_OPT_DOMAIN, NNG_OPT_PROTOCOL, and NNG_OPT_TRANSPORTGarrett D'Amore2018-03-17
| | | | | While here we documented that certain options are not supported in the compatibility layer.
* epoll: add epoll-based pollq implementationLiam Staskawicz2018-03-15
| | | | fixes #33
* fixes #289 nng_sockaddr could just be a unionGarrett D'Amore2018-03-14
| | | | fixes #290 sockaddr improvements
* nng_sleep_aio should honor aio timeout.Garrett D'Amore2018-03-12
| | | | | | | | | | | | | | The first problem was that using nng_sleep_aio was found to reset the timeout, and this caused subsequent operations to start failing with timeouts when reusing the AIO for other operations. The second thing is that we think it would be nicer if the presence of real aio timeouts were still honored, so that if the timeout is shorter than the sleep time, then we get back an NNG_ETIMEDOUT like every other operation, and we get back a 0 if the logical sleep operation completes normally.
* fixes #281 desire nng_sleep_aio()Garrett D'Amore2018-03-12
|
* fixes #276 decouple NNG and zerotier definitionsGarrett D'Amore2018-03-10
|
* fixes #269 nngcat unreliable with ZeroTier transportGarrett D'Amore2018-03-07
| | | | | | | | | | | | | | | | | | | | This does a few things. First it closes a case where a dropped message could prevent subsequent connection attempts from getting through. Second, it changes the rate at which we retry, and the timeout, to be a lot more aggressive when attempting to establish a connection. We retry every 500 ms, for up to 2 minutes, before giving up. This gives a lot more resilience in the face of message loss that is typical of ZeroTier in some environments when first establishing communication. Third, makes the values for the connection attempts *tunable*, so that applications can adjust for different deployment scenarios. Fourth, it includes the ability to get the UDP socket name. This was needed during some debug, and may be useful for a real UDP transport later, so we're keeping it. Finally, we added documentation for the above items.
* Fix for Windows compilation warnings.Garrett D'Amore2018-03-05
|
* fixes #265 nngcat should support persistent ZT nodesGarrett D'Amore2018-03-05
| | | | fixes #267 zerotier transport should lock ZT_HOME
* ZeroTier timestamps are signed now.Garrett D'Amore2018-03-05
| | | | | | | The dev branch changed, and the timestamps are signed. (They are also passed around using volatiles -- probably incorrectly so, but that is not important for us, the compiler understands that volatile is meaningless when passing values by value.)
* Remove stale ZeroTier RFC, update URL and link to correct one.Garrett D'Amore2018-03-05
| | | | | | | | The primary ZeroTier RFC is in the "rfcs" repository for nanomsg, and we should remove this one because it is stale and misleading. Also, the URI format is incorrect in the header so fix that, and point to the real ZeroTier RFC.
* fixes #262 NNG_OPT_URL should be resolvedGarrett D'Amore2018-03-04
| | | | | | | | This causes TCP, TLS, and ZT endpoints to resolve any wildcards, and even IP addresses, when reporting the listen URL. The dialer URL is reported unresolved. Test cases for this are added as well, and nngcat actually reports this if --verbose is supplied.
* kqueue: add license infoLiam Staskawicz2018-03-04
|
* fixes #254 nngcat should have a --version optionGarrett D'Amore2018-03-02
| | | | | | We only add a basic --version (also -V). I'm still trying to figure out how to convince cmake to emit its compilation flags into a file where we can use them for output.
* Remove some dead code.Garrett D'Amore2018-03-02
|
* Isolate TLS functions into separate tls.h header file.Garrett D'Amore2018-03-02
|
* Bump version to 0.5.0.0.5.0Garrett D'Amore2018-03-02
|
* ipc: more robust initLiam Staskawicz2018-03-02
|
* kqueue: add kqueue-based pollq implementationLiam Staskawicz2018-03-02
|
* fixes #247 nngcat needs TLS optionsGarrett D'Amore2018-03-02
| | | | | | | While here we also fixed a bug in the --file handling that we noticed while writing the TLS handling. We also fixed a warning in the core (msgqueue) for set but unused variables.
* fixes #240 nngcat is MIAGarrett D'Amore2018-02-28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is intended to provide compatibility with, and has been tested against, legacy nanocat. There are a few differences though. At this time support for the alias names (where argv[0] is set to something like nngreq or somesuch) is missing. By default this library operations without NNG_FLAG_NONBLOCK on dial and listen, so that failures here are immediately diagnosable. (This behavior can be changed with the --async flag.) By default --pair means PAIRv1, but you can specify --pair0 or --pair1 explicitly. (There is also a --compat mode, and in that mode --pair means PAIRv0. The --compat mode also turns on NNG_FLAG_NONBLOCK by default.) The "quoted" mode also quotes tabs. (Legacy nanocat did not.) It is possible to connect to *multiple* peers by using the --dial or --listen (or similar) options multiple times. Shorthands can be used for long options that are not ambiguous. For example, --surv can be used to mean surveyor, but --re is invalid because it can mean req, rep, or respondent. We assume you have a reasonable standard C environment. This won't work in embedded environments without support for FILE *. TLS options are missing but to be added soon. A man page is still to be written.
* Windows IPC connection timer still thinks its usec.Garrett D'Amore2018-02-26
| | | | | | We changed the timers to use msec granularity, but we missed this one. The result is that in certain code flows the IPC connection times can look quite long -- with weird 10 sec stalls.
* Hang in concurrent IPC connection close.Garrett D'Amore2018-02-26
| | | | | | ConnectNamedPipe can return ERROR_PIPE_CONNECTED, and does not enqueue a completion packet if it does. So we need to handle that specially.
* Move compatibility header so that <nanomsg/nn.h> works.Garrett D'Amore2018-02-23
| | | | | | Basically, we have moved the compat stuff into a separate directory. Compatibility layer users will have to update their compile flags, but should be able to avoid changing any *source* files with this change.
* Add nng_opts_parse() API for handling command line options.Garrett D'Amore2018-02-22
| | | | | | | | | | | We have implemented this alternative to getopt() so that we can create nngcat. The reason we did not just use getopt() is that getopt() does not understand long options (which nanocat uses, and we want to preserve for compatibility) and getopt() is not available on Windows (and possibly other non-POSIX platforms.) This function handles long and short options, but does not have support for option clustering. It also is threadsafe & reentrant, unlike getopt.