aboutsummaryrefslogtreecommitdiff
path: root/src/CMakeLists.txt
Commit message (Collapse)AuthorAge
...
* fixes #166 Websocket TLS mappingGarrett D'Amore2017-12-30
| | | | | | | | | | | | | | | | | This introduces the wss:// scheme, which is available and works like the ws:// scheme if TLS is enabled in the library. The library modularization is refactored somewhat, to make it easier to use. There is now a single NNG_ENABLE_TLS that enables TLS support under the hood. This also adds a new option for the TLS transport, NNG_OPT_TLS_CONFIG (and a similar one for WSS, NNG_OPT_TLS_WSS_CONFIG) that offer access to the underlying TLS configuration object, which now has a public API to go with it as well. Note that it is also possible to use pure HTTPS using the *private* API, which will be exposed in a public form soon.
* 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.
* Added SHA1 implementation and test suite.Garrett D'Amore2017-12-26
|
* Added base64 implementation, needed by websocket.Garrett D'Amore2017-12-26
|
* 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 #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.)
* 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.
* 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.
* 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.
* 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.
* 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.)
* Introduce utility safe string handling functions.Garrett D'Amore2017-08-28
| | | | | | | | We have our versions of strdup, strlcat, and strlcpy. This means we can avoid using snprintf() in many cases (saving cycles), and we can get safer checks. We use the platform supplied versions of these if they exist (wrapping with nni_xxx versions.)
* Conditional platform inclusion cleanups.Garrett D'Amore2017-08-21
| | | | | | | | | | We only compile files that are appropriate for the platform. (We still have guards in place, to allow for a future single .C file to be built from all the sources.) We also remove the subsystem defines; if a new platform needs to deviate from POSIX in ways beyond what we intended here, then that platform should just copy those parts into a new platform directory, rather than cross including portions from POSIX.
* Add new PAIR_V1 protocol.Garrett D'Amore2017-08-10
| | | | | | | | | | The PAIR_V1 protocol supports both raw and cooked modes, and has loop prevention included. It also has a polyamorous mode, wherein it allows multiple connections to be established. In polyamorous mode (set by an option), the sender requests a paritcular pipe by setting it on the message. We default to PAIR_V1 now.
* fixes #47 compat_reqttls fails sometimesGarrett D'Amore2017-08-09
| | | | fixes #23 Restore the old idhash logic for sockets
* Initial swag at UDP (POSIX only) low level handling.Garrett D'Amore2017-07-25
| | | | | | This includes async send and recv, driven from the poller. This will be requierd to support the underlying UDP and ZeroTier transports in the future. (ZeroTier is getting done first.)
* Windows IPC progress. Not working yet, but should be close.Garrett D'Amore2017-07-10
|
* Start of progress on Windows. Name resolution and IOCP work begins.Garrett D'Amore2017-07-07
|
* TCP asynchronous working now.Garrett D'Amore2017-07-07
| | | | | | | | | | | | | | | | It turns out that I had to fix a number of subtle asynchronous handling bugs, but now TCP is fully asynchronous. We need to change the high-level dial and listen interfaces to be async as well. Some of the transport APIs have changed here, and I've elected to change what we expose to consumers as endpoints into seperate dialers and listeners. Under the hood they are the same, but it turns out that its helpful to know the intended use of the endpoint at initialization time. Scalability still occasionally hangs on Linux. Investigation pending.
* Initial swag at asynchronous name resolution.Garrett D'Amore2017-07-06
|
* Remove obsolete poll.c.Garrett D'Amore2017-07-05
|
* Separate out poller/pollq from basic socket operations.Garrett D'Amore2017-07-04
|
* Use common socket handling on POSIX (tcp done, ipc pending.)Garrett D'Amore2017-06-29
|
* Convert to POSIX polled I/O for async; start of cancelable aio.Garrett D'Amore2017-06-27
| | | | | | | | | | | | | | | | | | This eliminates the two threads per pipe that were being used to provide basic I/O handling, replacing them with a single global thread for now, that uses poll and nonblocking I/O. This should lead to great scalability. The infrastructure is in place to easily expand to multiple polling worker threads. Some thought needs to be given about how to scale this to engage multiple CPUs. Horizontal scaling may also shorten the poll() lists easing C10K problem. We should look into better solutions than poll() for platforms that have them (epoll on Linux, kqueue on BSD, and event ports on illumos). Note that the file descriptors start out in blocking mode for now, but then are placed into non-blocking mode. This is because the negotiation phase is not yet callback driven, and so needs to be synchronous.
* Implementation of object hash (derived from idhash, but smarter.)Garrett D'Amore2017-06-02
|
* Timer implementation. Operations can timeout now?Garrett D'Amore2017-03-03
|
* Async I/O for POSIX implemented using threads (untested.)Garrett D'Amore2017-02-24
|
* Rename ioev to aio. Eliminate generic cancel handling (not needed).Garrett D'Amore2017-02-23
| | | | | | | | We will still need some kind of specific handling of cancellation for msg queues, but it will be simpler to just implement that for the queues, and not worry about cancellation in the general case around poll etc. (The low level poll and I/O routines will get notified by their underlying transport pipes/descriptors closing.)
* Introduce new generic I/O event framework.Garrett D'Amore2017-02-19
|
* Taskq implementation.Garrett D'Amore2017-02-18
|
* Add device support & testing. Bus semantic fix.Garrett D'Amore2017-01-27
| | | | | | | | | | | This adds nn_device and nng_device. There were some internal changes required to fix shutdown / close issues. Note that we shut down the sockets when exiting from device -- this is required to make both threads see the failure and bail, since we are not using a single event loop. I also noticed that the bus protocol had a bug where it would send messages back to the originator. This was specifically tested for in the compat_device test, and we have fixed it.
* Initial start of compat layer with bind, connect, etc. Untested.Garrett D'Amore2017-01-22
|
* Initial swag at notification pipes (not used yet).Garrett D'Amore2017-01-21
|
* Fix leaks in bus, socket leaks, tighten up close-side refcnting.Garrett D'Amore2017-01-21
| | | | | | | | | | | | | | This does a few things. First it closes some preexisting leaks. Second it tightens the overall close logic so that we automatically discard idhash resources (while keeping numeric values for next id etc. around) when the last socket is closed. This then eliminates the need for applications to ever explicitly terminate resources. It turns out platform-specific resources established at nni_init() time might still be leaked, but it's also the case that we now no longer dynamically allocate anything at platform initialization time. (This presumes that the platform doesn't do so under the hood when creating critical sections or mutexes for example.)
* Start of event framework.Garrett D'Amore2017-01-16
| | | | | | | | | | This compiles correctly, but doesn't actually deliver events yet. As part of this, I've made most of the initializables in nng safe to tear-down if uninitialized (or set to zero e.g. via calloc). This makes it loads easier to write the teardown on error code, since I can deinit everything, without worrying about which things have been initialized and which have not.
* Make sure to pass -DNNG_STATIC_LIB for static library.Garrett D'Amore2017-01-15
|
* Compile static *and* shared libraries.Garrett D'Amore2017-01-15
| | | | | Test code needs to use the static libraries so that they can get access to the entire set of symbols, including private ones that are not exported.
* Initial swag at Win32. Much to do still.Garrett D'Amore2017-01-12
|
* Pull out the posix clock stuff for plat_clock.Garrett D'Amore2017-01-12
|
* Add IPC (UNIX domain sockets) for POSIX, and test suite.Garrett D'Amore2017-01-12
|
* Initial (untested) bus implementation.Garrett D'Amore2017-01-10
|
* New ISAAC pRNG. This replaces other local hacks for random data.Garrett D'Amore2017-01-08
| | | | | | Platforms must seed the pRNGs by offering an nni_plat_seed_prng() routine. Implementations for POSIX using various options (including the /dev/urandom device) are supplied.
* Add surveyor protocol (no tests yet).Garrett D'Amore2017-01-08
| | | | | | | This adds the surveyor protocol, and updates the respondent somewhat. I've switched to using generic names for per-pipe and per-socket protocol data. Hopefully this will make 'cut-n-paste' from other protocol implementations easier.
* Add respondent protocol. (Half of survey pattern.)Garrett D'Amore2017-01-08
|
* Initial swag at pipeline (PUSH/PULL).Garrett D'Amore2017-01-06
| | | | | | | | | | | | | | | PUSH attempts to do a round-robin based distribution. However, I noticed that there is a bug in REQ, because REQ sockets will continue to pull down work until the first one no longer has room. This can in theory lead to scheduliung imbalances when the load is very light. (Under heavy load, the backpressure dominates.) Also, I note that mangos suffers the same problem. It does not make any attempt to deliver work equally, basically each pipe winds up pulling messages until its own buffers are full. This is bad. We can borrow the logic here for both REQ and mangos. None of this is tested yet.
* PUB protocol (untested).Garrett D'Amore2017-01-05
|
* SUB protocol implemented (uses sorted linked list for topics).Garrett D'Amore2017-01-05
|
* Initial cut at TCP, totally untested beyond compilation.Garrett D'Amore2017-01-04
| | | | | This also adds checks in the protocols to verify that pipe peers are of the proper protocol.
* Working towards TCP support.Garrett D'Amore2017-01-03
|