summaryrefslogtreecommitdiff
path: root/src/platform
Commit message (Collapse)AuthorAge
* fixes #2092 nng_close may hang on Windows (stable version)v1.10.1Garrett D'Amore2025-01-26
|
* windows ipc: check the return value of nni_aio_scheduleGarrett D'Amore2024-12-07
| | | | | This hopefully addresses a long standing bug with Windows IPC sometimes hanging on shut down.
* fixes #1900 'u_int32_t' undeclaredGarrett D'Amore2024-11-07
| | | | This bug was already fixed in the main branch.
* fix maybe uninitialized warningshikokuchuo2024-10-07
| | | | (cherry picked from commit 3cfd6ab21bfb8b02fde1e976fc0bf50bf729c8ab)
* fix int-to-pointer conversion warningshikokuchuo2024-10-07
| | | | (cherry picked from commit 9d0b023b39aae37adb6e5cb1a2b926777ffd2023)
* fixes #1866 clock_gettime is not used on Android, even though availablev1.9.0Garrett D'Amore2024-09-07
|
* fixes #1837 IPC - Use After FreeGarrett D'Amore2024-08-13
| | | | This fixes a problem only found on Windows, that affected both IPC and TCP.
* UDP: Introduce an experimental (undocumented for now) public API for UDP. ↵Garrett D'Amore2024-06-02
| | | | | | | | (#1838) This exposes the UDP methods as nng_ methods, and adds support for Multicast Membership, which is useful in a variety of situations. No documentation is provided, and applications should consider thios API experimental.
* windows: refactor IPC to avoid possible hangs and use after free.Garrett D'Amore2024-05-30
|
* windows: TCP connection use-after-free fixesGarrett D'Amore2024-05-30
|
* windows: ipc listen use after freeGarrett D'Amore2024-05-30
|
* windows: ipc conn conn_aio not usedGarrett D'Amore2024-05-30
|
* windows: fix TCP use-after-free in listenerGarrett D'Amore2024-05-30
| | | | | | | The logic with overlapped structures was fragile as it used overlapped ios for the connections rather than a single common one for the listener. This changes it to be more like POSIX, and robust against this error.
* windows: drop the hEvent initialization for win_io structures.Garrett D'Amore2024-05-30
| | | | We use overlapped I/O, so we don't need a separate hEvent.
* windows: IPC conn->conn_io is unusedGarrett D'Amore2024-05-30
|
* fixes #1825 Compiler warning due to unused variable in win_clock.cGarrett D'Amore2024-05-22
|
* Windows: add a check for broken legacy environments without timespec_get.Garrett D'Amore2024-05-22
| | | | | | | | | | If you want to build on Windows use a toolchain that supports modern APIs. This means, for Microsoft, UCRT (Universal C Runtime), which is supported by default on modern Visual Studio. MinGW users may have to go out of their way to enable it. (New -D_UCRT flag or something.) The supported toolchain for building on Windows is Visual Studio. Use of other tool chains is not officially supported or guaranteed to work. YMMV.
* Added realtime clock support, and better timestamping.Garrett D'Amore2024-04-14
| | | | | The realtime clock is not (yet) exposed for user applications, but it is used for logging timestamps accurately.
* add header to posix_rand_getrandom.cshikokuchuo2024-04-13
|
* Convert UDP platform test to NUTS.Garrett D'Amore2024-02-25
| | | | | | This also restores the IPv6 sanity check. Note that UDP is still not supported as a transport, but this can be used to implement higher level transports such as ZeroTier (or later QUIC).
* fixes #1496 Provide NNG_ENABLE_IPV6 option (disabled by default)Garrett D'Amore2024-02-25
| | | | | | | | | This also checks if the build system has the definitions for AF_INET6, which might help in some embedded IPv4 only settings. The resolver test is enhanced to include a check for IPv6 enabled in the kernel. IPv6 support is enabled by default, of course.
* fixes #1543 Deadlock in nng_close(socket)Garrett D'Amore2024-02-25
| | | | | | This looks like a possible problem that may be windows specific involving the flow for IO completion ports. This simplifies the logic a little bit, and should ensure that canceled requests on pipes do not restart.
* windows: Add missing header for string.hGarrett D'Amore2024-02-25
|
* Fix warning from inconsistent socket_pair prototype.Garrett D'Amore2024-01-06
|
* fixes #1572 nng creates too many threadsGarrett D'Amore2024-01-01
| | | | | | | | | | | | This further limits some of the thread counts, but principally it offers a new runtime facility, nng_init_set_parameter(), which can be used to set certain runtime parameters on the number of threads, provided it is called before the rest of application start up. This facility is quite intentionally "undocumented", at least for now, as we want to limit our commitment to it. Still this should be helpful for applications that need to reduce the number of threads that are created.
* provide NNG_MAX_POLLER_THREADSGarrett D'Amore2023-12-29
| | | | | | | This (defaults to 8) sets a limit on the number of poller threads that will be used for servicing I/Os. This is the size of the I/O completion port thread pool on Windows. POSIX pollers are generally not concurrent at present.
* ipc: refactor get peerid support to use common POSIX codeGarrett D'Amore2023-12-29
| | | | | This eliminates some code. A test is added as well, so this should help with coverage.
* fixes #1746 Create a new socket:// transport for socketpair() based connectionsGarrett D'Amore2023-12-29
| | | | | | | | | | | | | This transport only listens, and creates connections when the application calls setopt on the lister with NNG_OPT_SOCKET_FD, to pass a file descriptor. The FD is turned into an nng_stream, and utilized for SP. The protocol over the descriptor is identical to the TCP protocol (not the IPC protocol). The options for peer information are borrowed from the IPC transport, as they may be useful for these purposes. This includes a test suite and full documentation.
* fixes #1675 undefined behavior in posix ipc_dialer_dialGarrett D'Amore2023-09-14
| | | | (This also affects TCP, and fixed there.)
* Update win_tcpconn.cNissimBendanan2023-09-14
| | | | | fix compile error in nano using clang version 16.0.5 fix issue: https://github.com/nanomsg/nng/issues/1676
* posix_resolv_gai.c: add AI_NUMERICSERV where undefinedSergey Fedorov2023-04-19
|
* Fill NNG_PKGS to request nng dependencies from installed location. (#1641)Garrett D'Amore2023-02-05
| | | | Signed-off-by: Andrey Vostrikov <andrey.vostrikov@cogentembedded.com> Co-authored-by: Andrey Vostrikov <andrey.vostrikov@cogentembedded.com>
* Fixes the call to setsockopt(SO_UPDATE_ACCEPT_CONTEXT) on Windows (#1604)Ruben Valls2022-07-15
| | | From the Windows docs, this option must receive as parameters the listener socket.
* Fix mingw atomics (#1601)Ruben Valls2022-06-20
| | | | | | | | | | * Fixes compiling on Windows with Mingw Fixes the build error: "InterlockedDecrementAcquire64 not defined" on Mingw * fixes semantics of InterlockedDecrementRelease64 on Mingw From Microsoft docs, InterlockedDecrementRelease64 returns the resulting decremented value. The equivalent function on Mingw is `__atomic_sub_fetch`, not `__atomic_fetch_sub` (which returns the previous value).
* fixes Undefined reference to nni_atomic_dec & nni_atomic_dec64 on Windows. ↵alvin12212022-05-29
| | | | (#1591)
* fixes #1586 Undefined reference to nni_atomic_swap & nni_atomic_cas(Built by ↵alvin12212022-05-29
| | | | gcc 4.8.5 ). (#1587)
* fixes #1576 Fallback not used when clock_gettime is unavailable (crash on ↵Garrett D'Amore2022-04-18
| | | | OSX < 10.12)
* Replace nni_aio_prov_set_extra with nni_aio_prov_set_data.Garrett D'Amore2021-12-31
| | | | | | This takes one less parameter, and is simpler. It will let us reclaim the aio_prov_extra data space as well, so that we can use it for other purposes.
* fixes #1552 Several warnings compiling in Windows with Visual Studio 2019Garrett D'Amore2021-12-25
| | | | | Note that one of these warning is a real bug that would prevent TLS from functioning properly on Windows.
* fixes #1550 GCC diagnostic inside functions not supported in older compilersGarrett D'Amore2021-12-25
|
* Could use GCC atomics for older versions of GCC.Garrett D'Amore2021-12-08
| | | | | | | | This should help greatly with performance on older systems such as CentOS 7 and GCC 4.8. Though, such folks really should update to newer compilers. Folks running version of GCC earlier than 4.7 will still pay a rather significant performance penalty, as they still implement atomics with a global mutex.
* Fixes compiling on windows 32-bit (#1549)Edward Rudd2021-12-08
| | | | | | | | * use correct LONG type for nni_atomic_flag on win32 * use InterlockExchangeAdd for nni_atomic_get_bool - this is equivelent to InterlockAdd for the purposes of this call (since it is adding 0) - this allows the code to compile on 32bit windows
* Compilation failure for atomics on legacy platforms (gcc 4.8, centos 7)Garrett D'Amore2021-12-08
|
* Static condvar initialization.Garrett D'Amore2021-12-05
|
* Use static initialization for lists and mutexes.Garrett D'Amore2021-12-05
| | | | | | This eliminates some run-time initialization, moving it to compile time. Additional follow up work will expand on this to simplify initialization and reduce the need for certain locks.
* Provide atomic pointer support.Garrett D'Amore2021-12-05
| | | | | This is initially used for TLS to make loading the engine pointer faster, eliminating a much more expensive lock operation.
* fixes #1526 NNG_USE_CLOCKID Bug?Garrett D'Amore2021-11-27
| | | | | | | This makes CLOCK_MONOTONIC the default (as it should have been) for platforms that have it defined, except for Apple platforms which lack support for using anything other than the real time clock with condition variables. (And unfortunately silently ignore attempts to do otherwise.)
* fixes #1346 windows ipc winsec fails frequently in CI/CDGarrett D'Amore2021-11-02
|
* Remove redundant check.Garrett D'Amore2021-09-06
|
* fixes #1347 windows IPC accept cancellation not wired upGarrett D'Amore2021-09-06
|