aboutsummaryrefslogtreecommitdiff
path: root/src/platform/windows/win_io.c
Commit message (Collapse)AuthorAge
* Windows: Fix regression where no connections after 5 seconds can occurGarrett D'Amore2025-03-09
|
* Windows: Bring back hEvent -- needed for real IPC.Garrett D'Amore2025-02-18
|
* windows ipc: significant refactorGarrett D'Amore2024-12-09
| | | | | | | | | | | This refactors a lot of the IPC code to hopefully address various hangs on shutdown, etc. The problem is that named pipes are not terrifically reliable when it comes to aborting ConnectNamedPipe. Additionally there were some logic errors in some of our code that left things rather brittle. Ultimately this all needs to be replaced with UNIX domain sockets which are superior in many ways.
* refactor initialization/finalizationGarrett D'Amore2024-11-11
| | | | | | | | | Applications must now call nng_init(), but they can supply a set of parameters optionally. The code is now safe for multiple libraries to do this concurrently, meaning nng_fini no longer can race against another instance starting up. The nni_init checks on all public APIs are removed now.
* 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.
* 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 #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 #987 Memory leak in ipc_dialer_dial (Windows)Garrett D'Amore2019-09-23
|
* 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 #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.