diff options
| author | Garrett D'Amore <garrett@damore.org> | 2024-12-28 16:10:48 -0800 |
|---|---|---|
| committer | Garrett D'Amore <garrett@damore.org> | 2024-12-28 16:24:49 -0800 |
| commit | 6a414614d906999bd4eb6e9b2f96ca972b437ffc (patch) | |
| tree | 6454a86b9c23a38056c72260e8d1e7d6fba38c8a /src/platform/windows/win_tcp.h | |
| parent | 7b5515ca641f475dce8184a5d9fd67ceb860e843 (diff) | |
| download | nng-6a414614d906999bd4eb6e9b2f96ca972b437ffc.tar.gz nng-6a414614d906999bd4eb6e9b2f96ca972b437ffc.tar.bz2 nng-6a414614d906999bd4eb6e9b2f96ca972b437ffc.zip | |
windows tcp: Lookup extended TCP function pointers at startup
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".
Diffstat (limited to 'src/platform/windows/win_tcp.h')
| -rw-r--r-- | src/platform/windows/win_tcp.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/platform/windows/win_tcp.h b/src/platform/windows/win_tcp.h index 655a969c..ec8ab80c 100644 --- a/src/platform/windows/win_tcp.h +++ b/src/platform/windows/win_tcp.h @@ -42,4 +42,13 @@ struct nni_tcp_conn { extern int nni_win_tcp_init(nni_tcp_conn **, SOCKET); +// Following functions are wrappers around Windows functions that have to be +// looked up by pointer/GUID. +extern int nni_win_acceptex( + SOCKET listen, SOCKET child, void *buf, LPOVERLAPPED olpd); +extern void nni_win_get_acceptex_sockaddrs( + void *buf, SOCKADDR_STORAGE *self, SOCKADDR_STORAGE *peer); +extern int nni_win_connectex( + SOCKET s, SOCKADDR *peer, int peer_len, LPOVERLAPPED olpd); + #endif // NNG_PLATFORM_WIN_WINTCP_H |
