summaryrefslogtreecommitdiff
path: root/src/platform/windows
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.
* 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 #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.
* 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).