summaryrefslogtreecommitdiff
path: root/src/platform/windows
Commit message (Collapse)AuthorAge
* 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.
* 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.
* 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
* 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)
* 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 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
* 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 #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
|
* Remove extra wrapper for platform clock support.Garrett D'Amore2021-07-22
|
* fixes #1409 reader/writer lock desiredGarrett D'Amore2021-07-11
| | | | | | This provides the initial implementation, and converts the transport lookup routines to use it. This is probably of limited performance benefit, but rwlock's may be useful in further future work.
* fixes #1372 nni_reap could be smallerGarrett D'Amore2020-12-19
|
* fixes #1071 tran_chkopt can be cleaned upGarrett D'Amore2020-11-15
| | | | | | | | | | | | | | | | | This is a sweeping cleanup of the transport logic around options, and also harmonizes the names used when setting or getting options. Additionally, legacy methods are now moved into a separate file and can be elided via CMake or a preprocessor define. Fundamentally, the ability to set to transport options via the socket is deprecated; there are numerous problems with this and my earlier approaches to deal with this have been somewhat misguided. Further these approaches will not work with future protocol work that is planned (were some options need to be negotiated with peers at the time of connection establishment.) Documentation has been updated to reflect this. The test suites still make rather broad use of the older APIs, and will be converted later.
* fixes #1087 CMakeLists structural improvements desiredGarrett D'Amore2020-11-14
| | | | | This doesn't modularize all the tests yet, but it goes a long way in the right direction.
* Fix build regression on non-Windows platform (sorry!)Garrett D'Amore2020-11-12
|
* Base64 nits (code quality) fixed.Garrett D'Amore2020-11-12
| | | | | This also contains the start of some CMakefile refactoring and clean ups.
* Minor spelling tweaks for the aio framework.Garrett D'Amore2020-11-09
|
* fixes #1041 Abstract socket address for IPCGarrett D'Amore2020-11-08
| | | | | | | | | | | | | | | | | | | | | | | | fixes #1326 Linux IPC could use fchmod fixes #1327 getsockname on ipc may not work This introduces an abstract:// style transport, which on Linux results in using the abstract socket with the given name (not including the leading NULL byte). A new NNG_AF_ABSTRACT is provided. Auto bind abstract sockets are also supported. While here we have inlined the aios for the POSIX ipc pipe objects, eliminating at least one set of failure paths, and have also performed various other cleanups. A unix:// alias is available on POSIX systems, which acts just like ipc:// (and is fact just an alias). This is supplied so that in the future we can add support for AF_UNIX on Windows. We've also absorbed the ipcperms test into the new ipc_test suite. Finally we are now enforcing that IPC path names on Windows are not over the maximum size, rather than just silently truncating them.
* fixes #1311 reduce wasted use for nni_aioGarrett D'Amore2020-10-31
| | | | | | | | | | fixes #1317 IPv6 listener get port is incorrect fixes #1319 Want symbolic service names This is phase 1 of reducing the memory foot-print of aios, and also of pipes. This removes the largest consumer the socket address information, from the aio, which was only used by a few consumers.
* fixes #1022 Support tcp6 link local addressesGarrett D'Amore2020-10-29
|
* fixes #960 NNG threads inherit application thread nameGarrett D'Amore2020-08-08
| | | | | | This also exposes an nng_thread_set_name() function for applications to use. All NNG thread names start with "nng:". Note that support is highly dependent on the operating system.
* fixes #1242 EADDRINUSE is not reported on Win32Garrett D'Amore2020-07-27
|
* fixes #844 WebSocket wildcard host errorsGarrett D'Amore2020-07-27
| | | | | | | | | | fixes #1224 wss fails on IPV6 address This fixes bugs and inconsistencies in the way addresses are handled for HTTP (and consequently websocket). The Host: address line needs to look at numeric IPs and treat wildcards as if they are not specified, and needs to understand the IPv6 address format using brackets (e.g. [::1]:80).
* fixes #1210 Undefined reference to InterlockedAddNoFence (mingw64)Garrett D'Amore2020-02-26
|
* XREQ and others race on TTL.Garrett D'Amore2020-01-11
| | | | | | | | | | The TTL in these cases should have been atomic. To facilitate things we actually introduce an atomic int for convenience. We also introduce a convenience nni_msg_must_append_u32() and nni_msg_header_must_append_u32(), so that we can eliminate some failure tests that cannot ever happen. Combined with a new test for xreq, we have 100% coverage for xreq and more coverage for the other REQ/REP protocols.
* fixes #1105 pollable can be inlined, and use atomicsGarrett D'Amore2020-01-04
| | | | | This also introduces an nni_atomic_cas64 to help with lock-free designs. Some mechanical renaming was done in some of the protocols for spelling.
* Fixes broken win32 build. (#1092)Cody Piersall2020-01-02
| | | | | | When using the 32-bit Windows compiler, the functions InterlockedIncrementAcquire64() and and InterlockedDecrementRelease64() are not defined. So we fall back to the more generic InterlockedAcquire64() and InterlockedDecrement64() on 32-bit Windows.
* fixes #1083 Random number improvementsGarrett D'Amore2020-01-01
|
* Fixup a few codacy complaints.Garrett D'Amore2020-01-01
|
* fixes #1079 Use after free panic in tcp_dialerGarrett D'Amore2019-12-30
|
* fixes #1075 WebSocket heap use after freeGarrett D'Amore2019-12-30
| | | | | This also introduces a new atomic boolean type, so we can use that to trigger whether we've added the HTTP handler or not.
* fixes #1065 resolver leaks work structuresGarrett D'Amore2019-12-29
| | | | | | This includes changes to support setting the sanitizer *correctly* (the old code CMake stuff didn't quite get it right), and addresses a number of failures in the test code found by the address sanitizer.
* fixes #1062 Windows client connections cannot get NNG_OPT_LOCADDRGarrett D'Amore2019-12-28
|
* fixes #1051 nni_ntop is unusedGarrett D'Amore2019-12-27
|
* 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
|
* 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.
* 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.