aboutsummaryrefslogtreecommitdiff
path: root/src
Commit message (Collapse)AuthorAge
* Compilation fixes for Windows.Garrett D'Amore2017-12-27
|
* fixes #180 add websocket header propertiesGarrett D'Amore2017-12-27
|
* fixes #165 Add address properties for websocket pipesGarrett D'Amore2017-12-26
|
* fixes #2 Websocket transportGarrett D'Amore2017-12-26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This is a rather large changeset -- it fundamentally adds websocket transport, but as part of this changeset we added a generic framework for both HTTP and websocket. We also made some supporting changes to the core, such as changing the way timeouts work for AIOs and adding additional state keeping for AIOs, and adding a common framework for deferred finalization (to avoid certain kinds of circular deadlocks during resource cleanup). We also invented a new initialization framework so that we can avoid wiring in knowledge about them into the master initialization framework. The HTTP framework is not yet complete, but it is good enough for simple static serving and building additional services on top of -- including websocket. We expect both websocket and HTTP support to evolve considerably, and so these are not part of the public API yet. Property support for the websocket transport (in particular address properties) is still missing, as is support for TLS. The websocket transport here is a bit more robust than the original nanomsg implementation, as it supports multiple sockets listening at the same port sharing the same HTTP server instance, discriminating between them based on URI (and possibly the virtual host). Websocket is enabled by default at present, and work to conditionalize HTTP and websocket further (to minimize bloat) is still pending.
* Fix sha1 prototype.Garrett D'Amore2017-12-26
|
* Added SHA1 implementation and test suite.Garrett D'Amore2017-12-26
|
* Added base64 implementation, needed by websocket.Garrett D'Amore2017-12-26
|
* fixes #160 Convert TLS url from tls:// to tls+tcp://Garrett D'Amore2017-11-27
|
* Cope better with the net.h rename in mbedTLS 2.4.0.Garrett D'Amore2017-11-21
|
* fixes #3 TLS transportGarrett D'Amore2017-11-20
| | | | | | | | | | | | | | | | | | | This introduces a new transport (compatible with the TLS transport from mangos), using TLS v1.2. To use the new transport, you must have the mbed TLS library available on your system (Xenial libmbedtls-dev). You can use version 2.x or newer -- 1.3.x and PolarSSL versions are not supported. You enable the TLS transport with -DNNG_TRANSPORT_TLS=ON in the CMake configuration. You must configure the server certificate by default, and this can only be done using nng options. See the nng_tls man page for details. This work is experimental, and was made possible by Capitar IT Group BV, and Staysail Systems, Inc.
* fixes #154 underlyng TCP & IPC transports should support partial recv/sendGarrett D'Amore2017-11-13
| | | | fixes #155 POSIX TCP & IPC could avoid a lot of context switches
* fixes #150 IPC error during Bus testsGarrett D'Amore2017-11-05
|
* Closed socket returns NNG_ENOENT instead of NNG_ECLOSED.Garrett D'Amore2017-11-05
|
* Darwin needs to use SO_NOSIGPIPE.Garrett D'Amore2017-11-04
|
* fixes #147 surveyor protocol needs NNG_OPT_MAXTTLGarrett D'Amore2017-11-03
|
* fixes #143 Protocols and transports should be "configurable"Garrett D'Amore2017-11-02
| | | | | | | | | | | | | | | | | | | | This makes all the protocols and transports optional. All of them except ZeroTier are enabled by default, but you can now disable them (remove from the build) with cmake options. The test suite is modified so that tests still run as much as they can, but skip over things caused by missing functionality from the library (due to configuration). Further, the constant definitions and prototypes for functions that are specific to transports or protocols are moved into appropriate headers, which should be included directly by applications wishing to use these. We have also added and improved documentation -- all of the transports are documented, and several more man pages for protocols have been added. (Req/Rep and Surveyor are still missing.)
* fixes #137 Remove public access to numeric protocolsGarrett D'Amore2017-10-31
|
* fixes #136 consider eliminating nng_shutdownGarrett D'Amore2017-10-30
|
* Simplify pollq_add, use SO_NOSIGNAL option on macOS.Garrett D'Amore2017-10-30
|
* Eliminate the unused DRYRUN flag.Garrett D'Amore2017-10-26
|
* fixes #46 make device() use aios directlyGarrett D'Amore2017-10-26
| | | | | | | | | | This eliminates the separate threads used for devices, letting them benefit from the new aio framework. It also eliminates the legacy nni_sock_sendmsg and nni_sock_recvmsg internal APIs. It would appear that there is an opportunity here to provide asynchronous device support out to userland as well, exposing an aio to them. That work is deferred to later.
* fixes #45 expose aio to applicationsGarrett D'Amore2017-10-25
| | | | | | | | | | While here we added a test for the aio stuff, and cleaned up some dead code for the old fd notifications. There were a few improvements to shorten & clean code elsewhere, such as short-circuiting task wait when the task has no callback. The legacy sendmsg() and recvmsg() APIs are still in the socket core until we convert the device code to use the aios.
* Various man page fixups, add inproc header.Garrett D'Amore2017-10-24
| | | | | | | We added nng_inproc man page, and a header with an explicit registration method for it. We also fixed up the markup on several other pages, and corrected the include statements for nng_zerotier.
* fixes #132 Implement saner notification for file descriptorsGarrett D'Amore2017-10-24
| | | | | | | | | This eliminates the "quasi-functional" notify API altogether. The aio framework will be coming soon to replace it. As a bonus, apps (legacy apps) that use the notification FDs will see improved performance, since we don't have to context switch to give them a notification.
* fixes #112 Need to move some stuff from socket to message queuesGarrett D'Amore2017-10-23
|
* fixes #127 Bad format TCP address causes null pointer exceptionGarrett D'Amore2017-10-23
| | | | I've added some tests to validate this too.
* And another compile time regression.Garrett D'Amore2017-10-19
|
* POSIX fixups for certain platforms.Garrett D'Amore2017-10-19
|
* Eliminate stale nng_clock function.Garrett D'Amore2017-10-19
|
* fixes #123 latency tests with wrong message sizeGarrett D'Amore2017-10-19
|
* fixes #84 Consider using msec for durationsGarrett D'Amore2017-10-19
| | | | | | There is now a public nng_duration type. We have also updated the zerotier work to work with the signed int64_t's that the latst ZeroTier dev branch is using.
* fixes #120 nng_sockaddr options initialized with garbage dataGarrett D'Amore2017-10-19
|
* fixes #116 Add missing ::nng_pipe_getopt_usec implementationGarrett D'Amore2017-10-18
|
* fixes #110 Cancellation race in ZeroTierGarrett D'Amore2017-10-10
|
* fixes #92 Support ZT federations (moons)Garrett D'Amore2017-10-10
| | | | This also fixes a fence post error in the ephemeral state handling .
* New platform API for storage methods.Garrett D'Amore2017-10-09
| | | | | | | | | | | This includes converting the ZeroTier transport to use these. The new API supports file creation, retrieval, and deletion. It also supports directory methods for traversal, creation, and deletion. It also has a few methods to obtain well-known directories like $TMPDIR and $HOME. A rich test suite for this functionality is added as well.
* Add NNG_OPT_DOMAIN and NNG_OPT_SOCKNAME support for legacy compat.Garrett D'Amore2017-10-06
| | | | | | | | The NNG_OPT_SOCKNAME option is settable, to a limit of 64 bytes. The NNG_OPT_DOMAIN is read-only, but changes to match the setting of the NNG_OPT_RAW field. New applications should not use the NNG_OPT_DOMAIN option -- it is provided solely for use with the legacy NN_DOMAIN option in the compatibility layer.
* Improve UDP test coverage, fix numerous issues found.Garrett D'Amore2017-10-05
| | | | | | | | | | | | | | | | We introduced richer, deeper tests for UDP functionality. These tests uncovered a number of issues which this commit fixes. The Windows IOCP code needs to support multiple aios on a single nni_win_event. A redesign of the IOCP handling addresses that. The POSIX UDP code also needed fixes; foremost among them is the fact that the UDP file descriptor is not placed into non-blocking mode, leading to potential hangs. A number of race conditions and bugs along the implementation of the above items were uncovered and fixed. To the best of our knowledge the current code is bug-free.
* fixes #99 Still seeing segfaults in pair1 (rarely)Garrett D'Amore2017-10-03
|
* fixes #5 Address propertiesGarrett D'Amore2017-10-03
| | | | | | | | | Added TCP socket address properties on pipes. This adds the plumbing for the various platform specifics, and includes both v4 and v6 handling. We've included a TCPv6 test as well.
* Added more complete tests, and changes to property handling.Garrett D'Amore2017-10-02
| | | | | | | | | | | | | | | | We allow some properties to be set on endpoints after they are started; transports now responsible for checking that. (The new values will only apply to new connections of course!) We added short-hand functions for pipe properties, and also added uint64_t shorthands across the board. The zerotier documentation got some updates (corrections). We have also added a separate header now for the ZT stuff. Also, dialers and listeners do not intermix anymore -- we test that only a dialer can be used with setting dialer options, and likewise for listeners.
* Add support for ZT sockaddr properties (pipe).Garrett D'Amore2017-09-30
| | | | Also add a generic property test function to trantest.
* Windows UDP support.Garrett D'Amore2017-09-29
| | | | | | | This implements the basic UDP functionality for Windows (required for ZeroTier for example). We have also introduced a UDP test suite to validate that this actually works. While here a few Windows compilation warnings / nits were fixed.
* fixes #91 pair1 segfault seenGarrett D'Amore2017-09-28
|
* fixes #93 ZT physicalMTU parameter vanishedGarrett D'Amore2017-09-28
| | | | | | | fixes #94 don't allocate ZT send frame on stack Note that due to some other bug (in ZeroTier itself?) this fails to function unless ZT was built with -DZT_DEBUG=1 on macOS.
* fixes #85 Protocols need to set msg pipeGarrett D'Amore2017-09-27
| | | | | | | We looked at other options, but this is the least intrusive, even though it means that the protocols have to set it up. The reason is that transports have different methods of receiving messages, and there is no framework code between the transport and the protocol.
* Remove last vestiges of integer option numbers.Garrett D'Amore2017-09-27
|
* Refactor option handling APIs.Garrett D'Amore2017-09-27
| | | | | | | | | | | | This makes the APIs use string keys, and largely eliminates the use of integer option IDs altogether. The underlying registration for options is also now a bit richer, letting protcols and transports declare the actual options they use, rather than calling down into each entry point carte blanche and relying on ENOTSUP. This code may not be as fast as the integers was, but it is more intuitive, easier to extend, and is not on any hot code paths. (If you're diddling options on a hot code path you're doing something wrong.)
* ZeroTier transport implementation (work funded by Capitar IT Group BV)Garrett D'Amore2017-09-26
| | | | | | | | | | | | | The ZeroTier transport is experimental at this point, and not enabled by default. It does not work with Windows yet (the Windows platform needs UDP support first.) Configure with -DNNG_ENABLE_ZEROTIER=yes -DNNG_ZEROTIER_SOUCE=<path> The <path> must point to a dev branch of the ZeroTierOne source tree, checked out, and built with a libzerotiercore.a in the top directory, and a ZeroTierOne.h header located at include. The build will add -lc++ to the compile, as the ZeroTier core functionality is written in C++ and needs some runtime support (e.g. new, delete, etc.)
* More pipe option handling, pipe API support. Url option.Garrett D'Amore2017-09-22
| | | | | | | | | | This fleshes most of the pipe API out, making it available to end user code. It also adds a URL option that is independent of the address options (which would be sockaddrs.) Also, we are now setting the pipe for req/rep. The other protocols need to have the same logic added to set the receive pipe on the message. (Pair is already done.)