aboutsummaryrefslogtreecommitdiff
path: root/CMakeLists.txt
Commit message (Collapse)AuthorAge
...
* fixes #769 How to limit worker threadsMatt Gigli2018-12-16
| | | | | * Expose cmake variable to set number of DNS resolver threads: NNG_RESOLV_CONCURRENCY * Expose cmake variable to set number of taskq threads: NNG_NUM_TASKQ_THREADS
* fixes #780 travis-ci cmake fails with `No VERSION specified...`Garrett D'Amore2018-11-08
|
* fixes #779 Bump ABI version for v1.1v1.1.0-rcGarrett D'Amore2018-11-05
|
* fixes #577 target library dependencies should be publicGarrett D'Amore2018-11-05
| | | | | | | | | | | This is a significant refactor of the library configuration. We use the modern package configuration helper, with a template script that also does the find_package dance for any of our dependencies. We also have restructured the code so that most protocols and transports have their configuration isolated to their own CMakeLists file, reducing the size of the global CMakeLists file.
* fixes #767 Want tunable stack sizeGarrett D'Amore2018-10-31
|
* fixes #735 Configuring ZeroTier for a unified build is too hardGarrett D'Amore2018-09-24
| | | | | | | This changes the code to make use of a different project we have created (libzerotiercore) that is "CMake clean". This should make using and configuring this code *much* better. It may also have the benefit of making this configuration work better for Windows systems.
* fixes #4 Statistics supportGarrett D'Amore2018-09-03
| | | | | | | | | | | | | | | | This introduces new public APIs for obtaining statistics, and adds some generic stats for dialers, listeners, pipes, and sockets. Also added are stats for inproc and pairv1 protocol. The other protocols and transports will have stats added incrementally as time goes on. A simple test program, and man pages are provided for this. Start by looking at nng_stat(5). Statistics does have some impact, and they can be disabled by using the advanced NNG_ENABLE_STATS (setting it to OFF, it's ON by default) if you need to build a minimized configuration.
* fixes #684 CentOS 5 broken -- has epoll but not eventfdGarrett D'Amore2018-08-30
|
* fixed compilation error on OpenBSD, missing sockpeercred (#659)Francisc Simon2018-08-19
| | | fixed compilation error on OpenBSD, missing sockpeercred
* Added QNX build support for cmake.Mike Bush2018-07-24
|
* fixes #572 Several locking errors foundGarrett D'Amore2018-07-03
| | | | | | | | | | fixes #573 atomic flags could help This introduces a new atomic flag, and reduces some of the global locking. The lock refactoring work is not yet complete, but this is a positive step forward, and should help with certain things. While here we also fixed a compile warning due to incorrect types.
* fixes #496 nngcat tests fail in Xcode buildGarrett D'Amore2018-06-01
| | | | | | | | | | | | This avoids copying the tests, but runs them with bash from the source directory, and passes the path to the built nngcat binary to the script. It also permits these to run if we find bash, so that systems without bash won't run it and fail. We still only do this on POSIX though, because Windows bash is too broken to use for some of the tests.
* fixes #477 Android NDK build configurationGarrett D'Amore2018-05-30
| | | | | | | | | | | | This enables the software to be built for Android, going back to at least Android SDK r15 (IceCreamSandwich) and at least up to SDK r27 (Oreo). Older versions of Android may work, but we have no way to build them to test. While here we have changed our CMake configuration to disable building tools or tests when we detect a cross-compile situation. Documentation for cross-compilation is updated as well.
* fixes #484 crashes in websocket transportGarrett D'Amore2018-05-29
| | | | | | | | | | | | | | | | | | | | | | | fixes #490 posix_epdesc use-after-free bug fixes #489 Sanitizer based testing would help fixes #492 Numerous memory leaks found with sanitizer This introduces support for compiler-based sanitizers when using clang or gcc (and not on Windows). See NNG_SANITIZER for possible settings such as "thread" or "address". Furthermore, we have fixed the issues we found with both the thread and address sanitizers. We believe that the thread issues pointed to a low frequency use-after-free responsible for rare crashes in some of the tests. The tests generally have their timeouts doubled when running under a sanitizer, to account for the extra long times that the sanitizer can cause these to take. While here, we also changed the compat_ws test to avoid a particularly painful and time consuming DNS lookup, and we made the nngcat_unlimited test a bit more robust by waiting before sending traffic.
* fixes #486 Revisit SOVERSION and VERSIONGarrett D'Amore2018-05-25
| | | | | | | | | | | | | | | | | | | | | | fixes #485 Honor BUILD_SHARED_LIBS fixes #483 Don't expose private symbols in shared library fixes #481 Export CMake target This is a "large" commit involving changes that don't affect the code directly, but which have an impact on how we package and build our project. The most significant of these changes is that we now build only either a shared or a static library, depending on the setting of the BUILD_SHARED_LIBS option. We also suppress private symbols from being exposed when the underlying toolchain lets us do so. Minor updates to the way we version the ABI are used, and we now have a nice exported CMake project. To import this project in another, simply do find_package(nng) and you can add target_link_libraries(nng::nng) to your targets. CMake does the rest for you.
* fixes #476 Crank the library ABI versionGarrett D'Amore2018-05-22
|
* fixes #469 SO_REUSEADDR should be enabledGarrett D'Amore2018-05-21
| | | | | | | | | | | | | | | | | | | fixes #468 TCP nodelay and keepalive should start usable fixes #467 NN_RCVMAXSZ option does not work (compat) fixes #465 Support NN_OPT_TCPNODELAY (compat) This is a rather larger change set than I'd like, but when adding support for legacy TCP keepalive, I found a number if issues using the legacy TCP test (which we are introducing with this commit.) This fixes the concerns that are relevant and addressible. We have elected not to try to support to local address binding at this time, and the IPv6 test case in the old code was wrong, so changes relevant to that are commented out. I've also updated the nng_compat manual page to reflect additional caveats that folks should be aware of, including the previously undocumented caveat around the NN_SNDBUF and NN_RCVBUF options.
* fixes #444 Stop looking for asciidoctor by defaultGarrett D'Amore2018-05-18
| | | | | | | | | | | While here, we have actually cleaned this up and enabled documentation building to work, for folks that want it. We default to off, because frankly folks should just use the website and be happy. If docs are enabled, then both man pages and html are generated. The man pages are noticably inferior (only so much you can do with 80 columns of text), but some people have indicated they prefer to be able to type "man" something.
* fixes #393 panic on illumos - epoll assertion errorGarrett D'Amore2018-05-06
| | | | | | | | This replaces the epoll support with proper illumos/SunOS port events. The port event support is structured so that it actually is superior to epoll and kqueue, because it avoids a single master lock on the poller. In the future we will explore this for macOS and Linux pollers.
* 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 #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.
* Remove .version file -- we use git tags.Garrett D'Amore2018-03-18
|
* epoll: add epoll-based pollq implementationLiam Staskawicz2018-03-15
| | | | fixes #33
* 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 kqueue-based pollq implementationLiam Staskawicz2018-03-02
|
* 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.
* CMake & CPack improvements.Garrett D'Amore2018-02-21
| | | | | | | | | These are incremental updates... we avoid using install() in the subdirectories, so that we can adapt properly to them in the single parent directory. We have started some of the work to improve support for CPack. This is still not yet done, but work in progress.
* 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.
* fixes #228 aio iov should have larger limits (dynamically allocated)Garrett D'Amore2018-02-05
|
* fixes #173 Define public HTTP server APIGarrett D'Amore2018-02-01
| | | | | | | | | | | | | | | | | | | | | | | This introduces enough of the HTTP API to support fully server applications, including creation of websocket style protocols, pluggable handlers, and so forth. We have also introduced scatter/gather I/O (rudimentary) for aios, and made other enhancements to the AIO framework. The internals of the AIOs themselves are now fully private, and we have eliminated the aio->a_addr member, with plans to remove the pipe and possibly message members as well. A few other minor issues were found and fixed as well. The HTTP API includes request, response, and connection objects, which can be used with both servers and clients. It also defines the HTTP server and handler objects, which support server applications. Support for client applications will require a client object to be exposed, and that should be happening shortly. None of this is "documented" yet, bug again, we will follow up shortly.
* fixes #223 Double definition of -DNNG_PLATFORM_POSIX for Darwin platformGarrett D'Amore2018-01-26
|
* 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 #172 HTTP and websocket need better conditional inclusionGarrett D'Amore2017-12-28
|
* Compilation fixes for Windows.Garrett D'Amore2017-12-27
|
* 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.
* 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.)
* 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.)
* Add C++ test program, proving C++ consumers work.Garrett D'Amore2017-09-26
| | | | | | We fixed up the coverage flags for GNU C, but are not going to run the C++ tests when doing coverage (they fail linking gcov for reasons unknown.)
* Add nni_strnlen.Garrett D'Amore2017-08-28
| | | | More string safety for stuff coming from externals.
* 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.
* Compiler switches need to be a string.Garrett D'Amore2017-08-07
|
* Problem was module path override, I think.Garrett D'Amore2017-08-07
|
* More coverage tweaks (I hope).Garrett D'Amore2017-08-07
|
* Richer CI support on Travis, including code coverage.Garrett D'Amore2017-08-07
| | | | We use codecov.io; this seems to work well.
* COnvert UDP to new style.Garrett D'Amore2017-08-04
|
* Use common socket handling on POSIX (tcp done, ipc pending.)Garrett D'Amore2017-06-29
|
* Added more plumbing to facilitate test writing & compatibility.Garrett D'Amore2017-01-26
| | | | | | Also, while here fixed a bug for the PAIR protocol in compat mode. It should now be possible to import more of the nanomsg tests directly with little or no modification.
* Initial swag at notification pipes (not used yet).Garrett D'Amore2017-01-21
|