summaryrefslogtreecommitdiff
path: root/src/platform
Commit message (Collapse)AuthorAge
* Address complaints found by lgtm.com.Garrett D'Amore2019-12-11
|
* fixes #970 TCP connections through docker-proxy do not reconnectGarrett D'Amore2019-09-24
|
* fixes #987 Memory leak in ipc_dialer_dial (Windows)Garrett D'Amore2019-09-23
|
* MinGW fixes for interlocked variablesGarrett D'Amore2019-06-27
|
* wrong return type in fallback atomic opGarrett D'Amore2019-06-05
|
* fix #946 Use after free in TLSGarrett D'Amore2019-05-19
| | | | | This also introduces a more efficient reference counting usage based on atomics, rather than locks.
* posix va_start incorrectGarrett D'Amore2019-05-07
|
* Introduce nni_plat_printf()Garrett D'Amore2019-05-07
| | | | | This permits the stats dump to avoid some extra buffering, and resolves a complaint about possible format buffer overruns.
* fixes #901 shorter option get/set functions for all typesJake Woltersdorf2019-04-07
| | | | | | | | | | | | - Renamed internal nng_*_getx/setx methods with "nni" prefix - Moved stream get/set option definition macros to options.h and added "NNI_" prefix - "_PTR" variant of get/set option definition macros is for when first arg is passed as pointer (`nng_stream *s` vs `nng_pipe s`) - New get/set option functions for `nng_socket` are `nng_socket_get_X` eschewing the previous `nng_getopt` pattern - Macro-fy legacy getopt/setopt and implement in terms of "new" API - nng_setopt* use "new" shorter API. Add missing uint64 set functions. - Shorter get/set option functions get own man page and old getopt/setopt link to them - Built with -DNNG_ENABLE_DOC=ON and part of central libnng index - Update copyright
* fixes #890 Windows mingw interlocked exchange not quite rightGarrett D'Amore2019-02-23
|
* fixes #891 Need to handle more getaddrinfo() error codesGarrett D'Amore2019-02-23
|
* fixes #879 Desire NNG_OPT_TCP_BOUND_PORTGarrett D'Amore2019-02-16
| | | | | | We also have made some support changes, including new APIs for printing URLs, and some improvements to the NNG_OPT_URL to make use of this new property.
* fixes #872 create unified nng_stream APIGarrett D'Amore2019-02-16
| | | | | | | | | This is a major change, and includes changes to use a polymorphic stream API for all transports. There have been related bugs fixed along the way. Additionally the man pages have changed. The old non-polymorphic APIs are removed now. This is a breaking change, but the old APIs were never part of any released public API.
* Fix bug #868Alexander Pickering2019-02-15
| | | | | | Define a InterlockedAddNoFence64() function using gcc's atomics on mingw(32|64) (https://gcc.gnu.org/onlinedocs/gcc/_005f_005fatomic-Builtins.html)
* fixes #853 Move IPC options to nng.hGarrett D'Amore2019-01-06
|
* fixes #839 TCP listener_start API should use constant sockaddrGarrett D'Amore2019-01-06
|
* fixes #849 TCP option handling not quite rightGarrett D'Amore2019-01-05
|
* fixes #825 TCP public API should use generic setopt/getoptGarrett D'Amore2018-12-31
| | | | | | | | | | | | This changes much of the internal API for TCP option handling, and includes hooks for some of this in various consumers. Note that the consumers still need to have additional work done to complete them, which will be part of providing public "raw" TLS and WebSocket APIs. We would also like to finish addressing the call sites of nni_tcp_listener_start() that assume the sockaddr is modified -- it would be superior to use the NNG_OPT_LOCADDR option. Thaat will be addressed in a follow up PR.
* fixes #834 Simplify IPC internal API & updateGarrett D'Amore2018-12-31
| | | | | This also makes some smaller related changes to use the new nni_type instead of nni_opt_type.
* progress on IPC endpointsGarrett D'Amore2018-12-29
|
* IPC option rework (pipe/conn) to reduce code duplication.Garrett D'Amore2018-12-29
|
* fixes #823 Define public IPC (#824)Garrett D'Amore2018-12-22
| | | | | | | This introduces a basic IPC API, modeled on the TCP API, for direct access. Only connection options are exposed at present -- we need to add options for dialers and listeners (and particularly listener settings for permissions and security attributes.) Documentation is still outstanding, but a very limited test suite exists.
* 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 #767 Want tunable stack sizeGarrett D'Amore2018-10-31
|
* Fix win file type (#749)Hunter2018-10-12
| | | | | before: nni_file_is_dir with path D:\\ D:/ D: all returns false after: nni_file_is_dir with path D:\\ D:/ D: all returns true
* fixes #712 windows nni_atomic_set64 should not return valueGarrett D'Amore2018-09-09
|
* fixes #687 POLLHUP is problematic on macOS too...Garrett D'Amore2018-08-30
| | | | | | | | | Basically, we can ignore EV_EOF, as we wind up still alerting the corresponding events. EV_ERROR we still treat as HUP. (The EV_EOF was responsible for prematurely closing the socket and aborting transactions while there was still data in the socket buffers.)
* fixes #683 atomic 64 stuff broken on pre-C11 stacksGarrett D'Amore2018-08-29
|
* fixes #674 want 64-bit atomics (for stats)Garrett D'Amore2018-08-27
|
* fixes #608 Add TCP support to specify local network interfaceGarrett D'Amore2018-08-27
| | | | | This also fixes a leaked TCP connection on a failure path, which we noticed while working this change.
* fixes #668 Remove the old win_event stuffGarrett D'Amore2018-08-20
|
* fixes #665 Convert Windows UDP to raw IOCPGarrett D'Amore2018-08-20
|
* fixes #664 aio cancellation could be betterGarrett D'Amore2018-08-20
| | | | | | | | | This changes the signature of the aio cancellation routines to take the argument for cancellation directly, so we do not need to lookup the argument using the nni_aio_get_prov_data. We should probably consider eliminating nni_aio_get_prov_data, and co, and changing the prov_extra to reflect prov_data. Later.
* fixes #653 Weird connect failures in dialer (multistress) (#660)Garrett D'Amore2018-08-20
| | | | | | | The POLLHUP (or rather EPOLLHUP) flag does not quite mean the same thing in Linux, and we've seen random failures where we will sometimes get this event on a socket that is freshly connected. This might be a bug in Linux, but it is easy enough to workaround -- we just don't watch for it at all.
* fixed compilation error on OpenBSD, missing sockpeercred (#659)Francisc Simon2018-08-19
| | | fixed compilation error on OpenBSD, missing sockpeercred
* fixes #656 Don't connect/remove IPC sockets unless bind failsGarrett D'Amore2018-08-16
|
* fixes #611 Memory Leaks under WindowsGarrett D'Amore2018-08-06
| | | | | | | | | | | | | fixes #622 incorrect assumptions about malloc(0) Windows actually allocates an object of size zero when calling malloc on size zero. This is unusual behavior, and we just add logic to work more like malloc on POSIX systems. Other systems can return non-NULL objects to fixed pages here. We think the best option here is to uniformly return NULL from our APIs in these circumstances, and to include testing to validate that.
* Revert "fixes #599 nng_dial sync should not return until added to socket"Garrett D'Amore2018-08-06
| | | | | This changeset needs work. We are seeing errors described by This reverts commit d7f7c896c0ede24249ef63b1e45b1878bf4bd473.
* fixes #599 nng_dial sync should not return until added to socketGarrett D'Amore2018-08-05
| | | | | | | | | | fixes #208 pipe start should occur before connect / accept fixes #616 Race condition closing between header & body This refactors the transports to handle their own connection handshaking before passing the pipe to the socket. This changes and simplifies the setup. This also fixes a rather challenging race condition described by #616.
* fixes #605 NNI_ALLOC_STRUCT/NNI_ALLOC_STRUCTS should zero memoryGarrett D'Amore2018-07-24
|
* Modified code to explicitly set hints.ai_socktype passed to getaddrinfo(). ↵Mike Bush2018-07-24
| | | | On QNX, specifying a numeric servname while leaving ai_socktype unspecified would result in EAI_SERVICE.
* fixes #595 mutex leak and other minor errors in TCPGarrett D'Amore2018-07-18
| | | | | | | | | | | | | | | | fixes #596 POSIX IPC should move away from pipedesc/epdesc fixes #598 TLS and TCP listeners could support NNG_OPT_LOCADDR fixes #594 Windows IPC should use "new style" win_io code. fixes #597 macOS could support PEER PID This large change set cleans up the IPC support on Windows and POSIX. This has the beneficial impact of significantly reducing the complexity of the code, reducing locking, increasing concurrency (multiple dial and accepts can be outstanding now), reducing context switches (we complete thins synchronously now). While here we have added some missing option support, and fixed a few more bugs that we found in the TCP code changes from last week.
* fixes #591 incorrect reuse of server instances by websocketGarrett D'Amore2018-07-16
| | | | | This also arranges for server shutdown to be handled using the reaper, leading to more elegant cleanup.
* fixes #523 dialers could support multiple outstanding dial requestsGarrett D'Amore2018-07-16
| | | | | | | | | | | | | | | | | | | | | | | | fixes #179 DNS resolution should be done at connect time fixes #586 Windows IO completion port work could be better fixes #339 Windows iocp could use synchronous completions fixes #280 TCP abstraction improvements This is a rather monstrous set of changes, which refactors TCP, and the underlying Windows I/O completion path logic, in order to obtain a cleaner, simpler API, with support for asynchronous DNS lookups performed on connect rather than initialization time, the ability to have multiple connects or accepts pending, as well as fewer extraneous function calls. The Windows code also benefits from greatly reduced context switching, fewer lock operations performed, and a reduced number of system calls on the hot code path. (We use automatic event resetting instead of manual.) Some dead code was removed as well, and a few potential edge case leaks on failure paths (in the websocket code) were plugged. Note that all TCP based transports benefit from this work. The IPC code on Windows still uses the legacy IOCP for now, as does the UDP code (used for ZeroTier.) We will be converting those soon too.
* fixes #566 Windows iov resubmit routine is not used.Garrett D'Amore2018-07-06
|
* fixes #576 IPC listen unlinks UNIX socket on failureGarrett D'Amore2018-07-05
|
* fixes #575 kqueue spins hardGarrett D'Amore2018-07-04
| | | | | This sets the kqueue events to autoclear, reducing CPU usage to normal sane levels, and eliminating the hard spin.
* 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 #32 autoscale based on CPUs availableGarrett D'Amore2018-06-12
| | | | | | This should work on both Windows and the most common POSIX variants. We will create at least two threads for running completions, but there are numerous other threads in the code.
* fixes #525 posix nni_plat_tcp_ep_init should not mark mode unusedGarrett D'Amore2018-06-11
|