diff options
| author | Garrett D'Amore <garrett@damore.org> | 2017-09-29 15:27:08 -0700 |
|---|---|---|
| committer | Garrett D'Amore <garrett@damore.org> | 2017-09-29 20:00:36 -0700 |
| commit | 869d0eeb20657cd6d2e87d8c4836b086c6be448d (patch) | |
| tree | 4731bf410cf36fb3442861575807dbb83400a3b3 /src/platform/windows/win_thread.c | |
| parent | 82d17f6365a95a500c32ae3a4ad40ff6fb609f3e (diff) | |
| download | nng-869d0eeb20657cd6d2e87d8c4836b086c6be448d.tar.gz nng-869d0eeb20657cd6d2e87d8c4836b086c6be448d.tar.bz2 nng-869d0eeb20657cd6d2e87d8c4836b086c6be448d.zip | |
Windows UDP support.
This implements the basic UDP functionality for Windows (required
for ZeroTier for example). We have also introduced a UDP test suite
to validate that this actually works. While here a few Windows
compilation warnings / nits were fixed.
Diffstat (limited to 'src/platform/windows/win_thread.c')
| -rw-r--r-- | src/platform/windows/win_thread.c | 16 |
1 files changed, 6 insertions, 10 deletions
diff --git a/src/platform/windows/win_thread.c b/src/platform/windows/win_thread.c index 12049139..41ba721c 100644 --- a/src/platform/windows/win_thread.c +++ b/src/platform/windows/win_thread.c @@ -154,16 +154,11 @@ nni_plat_init(int (*helper)(void)) AcquireSRWLockExclusive(&lock); if (!plat_inited) { - if ((rv = nni_win_iocp_sysinit()) != 0) { - goto out; - } - if ((rv = nni_win_ipc_sysinit()) != 0) { - goto out; - } - if ((rv = nni_win_tcp_sysinit()) != 0) { - goto out; - } - if ((rv = nni_win_resolv_sysinit()) != 0) { + if (((rv = nni_win_iocp_sysinit()) != 0) || + ((rv = nni_win_ipc_sysinit()) != 0) || + ((rv = nni_win_tcp_sysinit()) != 0) || + ((rv = nni_win_udp_sysinit()) != 0) || + ((rv = nni_win_resolv_sysinit()) != 0)) { goto out; } @@ -182,6 +177,7 @@ nni_plat_fini(void) { nni_win_resolv_sysfini(); nni_win_ipc_sysfini(); + nni_win_udp_sysfini(); nni_win_tcp_sysfini(); nni_win_iocp_sysfini(); WSACleanup(); |
