summaryrefslogtreecommitdiff
path: root/tests
Commit message (Collapse)AuthorAge
* fixes #449 Want more flexible pipe eventsGarrett D'Amore2018-05-17
| | | | | | | | | This changes the signature of nng_pipe_notify(), and the associated events. The documentation is updated to reflect this. We have also broken the lock up so that we don't hold the master socket lock for some of these things, which may have beneficial impact on performance.
* Switch to clang 6 and gcc 8 on xenial for circle ci.Garrett D'Amore2018-05-16
| | | | We also fixed some warnings found by gcc8.
* fixes #430 Unable to build in MSYS + Win-buildsGarrett D'Amore2018-05-15
| | | | fixes #438 Consider dropping AI_V4MAPPED
* fixes #436 fix for 429 incomplete (ws ep crash)Garrett D'Amore2018-05-15
| | | | | | | While here, there is a little more endpoint termination hardening. Running this code base seems to not incur any faults beyond the very rare TCP port conflict that can occur from our random port selection in the test suite.
* fixes #433 tasks can leakGarrett D'Amore2018-05-15
| | | | | | While here I also improved the taskq.h comments (and removed a stale prototype for nni_task_cancel), and addressed leaks in the reqstress and multistress test programs.
* fixes #423 desire tunable stress time and pressure in stress testsGarrett D'Amore2018-05-09
| | | | | | | | Use -p STRESSPRESSURE=<count> (default 32) and -p STRESSTIME=<sec> to affect stress run. Pressure should be a number [2,x] where x is determined by the number of threads and file descriptors your platform can handle. Modern platforms should be able to handle at least 100.
* fixes #400 Some resolvers take a long time with garbage addressesGarrett D'Amore2018-05-06
|
* fixes #396 illumos doesn't build (missing NNG_PLATFORM_POSIX ON)Garrett D'Amore2018-05-06
| | | | | | | | | | | | | | | | | | | | | | | | | | | | fixes #397 Need to cast zoneid fixes #395 sun is predefined on illumos/Solaris fixes #394 alloca needs to #include <alloca.h> fixes #399 Cannot use SVR4.2 specific msghdr fixes #402 getpeerucred needs a NULL initialized ucred fixes #403 syntax error in posix_tcp - attempt to return void fixes #407 illumos getegid wrong fixes #406 nni_idhash_count is dead code fixes #404 idhash typedef redeclared fixes #405 warning: newline not last character in file This is basically a slew of related bug fixes required to make this work on illumos. Note that the fixes are not "complete", because more work is required to support port events given that epoll is busted on illumos. We also fixed a bunch of things that aren't actually "bugs" per se, but really just warnings. Silencing them makes things better for everyone. Apparently not all compilers are equally happy with redundant (but otherwise identical) typedefs; we use structs in some places instead of shorter type names to silence these complaints. Note that IPC permissions (the mode bits on the socket vnode) are not validated on SunOS systems. This change includes documentation to reflect that.
* fixes #401 timer overflow error in conveyGarrett D'Amore2018-05-06
|
* fixes #383 Would like peerid for IPCGarrett D'Amore2018-05-03
| | | | | We offer uid, gid, process id, and even zone id where we have them. Docs and tests are provided.
* Fix failures in pipe test on Windows.Garrett D'Amore2018-05-03
| | | | | | | | | | | The problem was that with inproc we could wind up calling the completion callback before actually returning the dialer ID to the structure, leading to false comparison failures. Creating the dialer and listener in separate steps ensures that we have IDs in place for them before any callback might be issued. Note that this was a bug in the test logic only, and not a problem with the underlying implementation.
* fixes #389 Need pipe notification callbacksGarrett D'Amore2018-05-03
| | | | | | | | This adds a new pipe event notification API (callbacks called on either pipe add or remove), including both tests and docs. Also supporting APIs to get the socket or endpoint associated with a pipe are included (tested and documented as well.)
* fixes #381 Want comparators for various typesGarrett D'Amore2018-05-01
|
* fixes #384 Add NN_PROTOCOL and relatedGarrett D'Amore2018-04-30
|
* fixes #6 Security attributes supportGarrett D'Amore2018-04-30
| | | | | | | | | | fixes #382 Permissions support for IPC on POSIX This adds support for permission management on Windows and POSIX systems. There are two different properties, and they are very different. Tests and documentation are included.
* fixes #379 httpbin.org no longer accepts clear HTTPGarrett D'Amore2018-04-28
|
* Add nonblocking test (test case for bug 346).Garrett D'Amore2018-04-28
|
* fixes #375 integer types are error proneGarrett D'Amore2018-04-26
| | | | | | | | | | | | | | This change converts the various integer types like nng_socket in the public API to opaque structures that are passed by value. Basically we just wrap the integer ID. This "hack" give us strong type checks by the compiler (yay!), at the expense of not being able to directly use these as numbers (so comparisions for example don't work, and neither does initialization to zero using the normal method. Comparison of disassembly output shows that at least with the optimizer enabled there is no difference in the compiler output between using a structure or an integral value.
* fixes #105 Want NNG_OPT_TCP_NODELAY optionGarrett D'Amore2018-04-26
| | | | fixes #106 TCP keepalive tuning
* fixes #347 Legacy option NN_SNDBUF and NN_RCVBUF in bytes not messagesGarrett D'Amore2018-04-25
|
* fixes #342 Want Surveyor/Respondent context supportGarrett D'Amore2018-04-24
| | | | | | | | | | | | | | | | fixes #360 core should nng_aio_begin before nng_aio_finish_error fixes #361 nng_send_aio should check for NULL message fixes #362 nni_msgq does not signal pollable on certain events This adds support for contexts for both sides of the surveyor pattern. Prior to this commit, the raw mode was completely broken, and there were numerous other bugs found and fixed. This integration includes *much* deeper validation of this pattern. Some changes to the core and other patterns have been made, where it was obvioius that we could make such improvements. (The obviousness stemming from the fact that RESPONDENT in particular is very closely derived from REP.)
* fixes #344 nn_poll() legacy API missingGarrett D'Amore2018-04-16
| | | | | | | | | | | | This includes the test from legacy libnanomsg and a man page. We have refactored the message queue notification system so that it uses nni_pollable, leading we hope to a more consistent system, and reducing the code size and complexity. We also fixed the size of the NN_RCVFD and NN_SNDFD so that they are a SOCKET on Windows systems, rather than an integer. This addresses 64-bit compilation problems.
* fixes #350 Incorrect compat error code from nn_setsockoptGarrett D'Amore2018-04-14
|
* fixes #308 Close can blockGarrett D'Amore2018-04-14
| | | | | | | | | | | | | | | | | | | | Ultimately, this just removes the support for lingering altogether. Based on prior experience, lingering has always been unreliable, and was removed in legacy libnanomsg ages ago. The problem is that operating system support for lingering is very inconsistent at best, and for some transports the very concept is somewhat meaningless. Making things worse, we were never able to adequately capture an exit() event from another thread -- so lingering was always a false promise. Applications that need to be sure that messages are delivered should either include an ack in their protocol, use req/rep (which has an ack), or inject a suitable delay of their own. For things going over local networks, an extra delay of 100 msec should be sufficient *most of the time*.
* Add new reqstress test.Garrett D'Amore2018-04-10
|
* fixes #337 compat_reqrep test too fragileGarrett 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 #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
|
* Need to create zt home for dialerJanjaap Bos2018-03-23
|
* 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 #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.
* Rx completion can run ahead of tx completion!Garrett D'Amore2018-03-14
|
* 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 #272 pollfd test fails on AppVeyorGarrett D'Amore2018-03-08
|
* 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 #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.
* Isolate TLS functions into separate tls.h header file.Garrett D'Amore2018-03-02
|
* fixes #250 nngcat may not build if protocols are missingGarrett D'Amore2018-02-28
|
* 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.
* Modularize HTTP headers somewhat.Garrett D'Amore2018-02-21
| | | | | | We move the HTTP definitions out of the core nng.h and into a supplemental header. Most of this change was trivial updates to all of the HTTP related manual pages.
* Introduce 'porting layer' Public API.Garrett D'Amore2018-02-20
| | | | | | | This introduces portable primitives for time, random numbers, synchronization primitives, and threading. These are somewhat primitive (least common denominiators), but they can help with writing portable applications, especially our own demo apps.
* fixes #234 Investigate enabling more verbose compiler warningsGarrett D'Amore2018-02-14
| | | | | | | We enabled verbose compiler warnings, and found a lot of issues. Some of these were even real bugs. As a bonus, we actually save some initialization steps in the compat layer, and avoid passing some variables we don't need.