aboutsummaryrefslogtreecommitdiff
path: root/src/platform/windows
Commit message (Collapse)AuthorAge
* Fix typos across docs, comments, and CMakemochalins2025-06-02
|
* Introduce DTLS transport for NNG.Garrett D'Amore2025-06-01
| | | | | | | | | | | | | This introduces a new experimental transport for DTLS, that provides encryption over UDP. It has a simpler protocol than the current UDP SP protocol (but we intend to fix that by making the UDP transport simpler in a follow up!) There are a few other fixes in the TLS layer itself, and in the build, that were needed to accomplish this work. Also there was an endianness bug in the UDP protocol handling, which is fixed here.
* Converted property functions to use nng_err.Garrett D'Amore2025-04-27
|
* Transport listen: use nng_errGarrett D'Amore2025-04-27
|
* More nng_err -- this time for dialer and listener allocations.Garrett D'Amore2025-04-27
|
* AIO: Use nng_err for cancellation callback instead of int.Garrett D'Amore2025-04-27
| | | | | | This is part of our work to improve type safety/awareness, and also improve debugger support, for NNG error codes. There are still quite a few more but this should help.
* TLS: break up the TLS layer a bit to refactor for DTLS.Garrett D'Amore2025-04-27
| | | | | | | | | | | This allows us to break the assumption that the bottom half is TCP, or even an nng_stream, since the DTLS layer will use a totally different layer. Only nng_stream neeeds to support dial and listen. Also: UDP: Make the sockaddr arguments to open const. Also: Align the IPv6 address in the sockaddr (this allows for efficient 64-bit or even 128-bit operations on these values.)
* 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
|
* fixes #2092 nng_close may hang on Windowsv2.0.0-alpha.4Garrett D'Amore2025-01-26
|
* platform: remove reader/writer locksGarrett D'Amore2025-01-05
| | | | | | The only thing using this was the transport lookups, but as those transports are now fully initialized in nng_init, we no longer need to lock that at all.
* platform: eliminate NNI_CV_INITIALIZER altogetherGarrett D'Amore2025-01-05
|
* fixes #2061 Move IPC parameters from uint64 to intGarrett D'Amore2025-01-03
|
* fixes #863 socket activation: for TCP and IPC (POSIX only)Garrett D'Amore2024-12-30
| | | | | | | | | This introduces a new option "NNG_OPT_LISTEN_FD", understood by TCP, TLS, and (on POSIX systems) IPC. This option is used to pass a file descriptor or handle (Windows) that is already listening (ready for ACCEPT to be called). For TCP and TLS, the socket must be of type AF_INET or AF_INET6, and for IPC it must be of type AF_UNIX.
* resolver: add some additional test coverageGarrett D'Amore2024-12-29
| | | | | | While here, remove some code paths that do not occur by definition. (For example, if the resolver succeeds, we will definitely have a valid set of addresses, but if it fails, we will definitely not.)
* resolver: use explicit resolver item provided by callerGarrett D'Amore2024-12-28
| | | | | | This avoids the need to perform multiple allocations for dialing, eliminating additional potential failures. Cancellation is also made simpler and more perfectly robust.
* windows tcp: fix compilation warningGarrett D'Amore2024-12-28
|
* tcp stream: add test for ESTATE getting port on unbound listenerGarrett D'Amore2024-12-28
|
* windows tcp: Lookup extended TCP function pointers at startupGarrett D'Amore2024-12-28
| | | | | | This avoids the need for a lock during listener or dialer initialization, and it avoids the need to carry these pointers on those objects. It also eliminates a potential failure case "post startup".
* tcp: flatten the listener implementationGarrett D'Amore2024-12-28
| | | | | | | | | | The endpoints both use a nesting level for some common code and some platform dependent code. But the common code isn't that much and we have similar patterns for e.g. IPC. This avoids a layer of indirection in the structs, and extra allocations. The payoff will be even larger for the dialers, but that is next. (Dialers are more complicated because of DNS.)
* udp: use nni_aio_startGarrett D'Amore2024-12-26
| | | | | | This also moves the close of the UDP socket later, to avoid a potential use after free while the aio's are still in-flight. Unfortunately we cannot unbind cleanly without a hard close.
* ipc: use nni_aio_startGarrett D'Amore2024-12-26
|
* resolver: use nni_aio_startGarrett D'Amore2024-12-26
|
* tcp: use nni_aio_startGarrett D'Amore2024-12-26
|
* pollers: use atomic bit masking operations to eliminate lockssGarrett D'Amore2024-12-22
| | | | This is done for kqueue and poll. Others coming soon.
* streams: add explicit stop functionsGarrett D'Amore2024-12-12
| | | | | | | | | | | | This allows us to explicitly stop streams, dialers, and listeners, before we start tearing down things. This hopefully will be useful in resolving use-after-free bugs in http, tls, and websockets. The new functions are not yet documented, but they are nng_stream_stop, nng_stream_dialer_stop, and nng_stream_listener_stop. They should be called after close, and before free. The close functions now close without blocking, but the stop function is allowed to block.
* 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.
* performance: reference counters can use relaxed order when incrementingGarrett D'Amore2024-12-07
|
* fini: add drain mechanism for aio, reap, and task subsystemsGarrett D'Amore2024-12-07
| | | | | Make sure *everything* is drained before proceeding all the way to deallocation.
* windows ipc: check the return value of nni_aio_scheduleGarrett D'Amore2024-12-03
| | | | | This hopefully addresses a long standing bug with Windows IPC sometimes hanging on shut down.
* Remove the NNG_OPT_IPC_SECURITY_DESCRIPTOR option.Garrett D'Amore2024-11-24
| | | | | | | | This is now replaced with nng_listener_set_security_descriptor and nng_stream_listener_set_security_descriptor functions. We may elect to remove these entirely, but for named pipe users they are probably still quite useful. Moving towards UNIX domain sockets would obsolete this functionality.
* ipc: Add NNG_OPT_REMADDR for dialer.Garrett D'Amore2024-11-23
|
* Use 32-bit port numbers.Garrett D'Amore2024-11-21
| | | | | While TCP and UDP port numbers are 16-bits, ZT uses a larger (24-bit) port number.
* URL refactor part 1.Garrett D'Amore2024-11-18
| | | | | | | This eliminates most (but not all) of the dynamic allocations associated with URL objects. A number of convenience fields on the URL are removed, but we are able to use common buffer for most of the details.
* URL u_port should be a number not a string.Garrett D'Amore2024-11-17
| | | | | | | | | | | The idea here is to reduce the dynamic allocations used for URLs, and also the back and forth with parsing begin strings and port numbers. We always resolve to a port number, and this is easier for everyone. The real goal in the long term is to eliminate dynamic allocation of the URL fields altogether, but that requires a little more work. This is a step in the right direction.
* 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.
* remove nni_plat_println - we have nni_plat_printf which is good enoughGarrett D'Amore2024-11-05
|
* Remove untyped nng_pipe_get, support for untyped sockaddr set.Garrett D'Amore2024-11-03
| | | | This is a step on the path to removing unsafe untyped option accesses.
* Remove nng_stream_set function family.Garrett D'Amore2024-10-28
| | | | This was not really used or useful.
* remove legacy support for configuration of transport options on socketGarrett D'Amore2024-10-20
| | | | | | | | | Transport specific options should be configured on the end point. This has the most impact for TLS, as TLS dialers and listeners will need to be allocated apriori, to configure TLS options. Some legacy tests were removed... we're going to remove the legacy libnanomsg compatibility layer anyway.
* fix maybe uninitialized warningshikokuchuo2024-10-05
|
* fix int-to-pointer conversion warningshikokuchuo2024-10-05
|
* 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.