aboutsummaryrefslogtreecommitdiff
path: root/src/platform/windows/win_io.c
diff options
context:
space:
mode:
authorGarrett D'Amore <garrett@damore.org>2018-07-16 17:10:47 -0700
committerGarrett D'Amore <garrett@damore.org>2018-07-18 13:25:33 -0700
commitb310f712828962bf3187caf3bfe064c3531c5628 (patch)
treef99ceb5851f601c93b0305617d692722f2978dd5 /src/platform/windows/win_io.c
parent3f40a08eab60df77dc61ae0350e59f36e8d0ed16 (diff)
downloadnng-b310f712828962bf3187caf3bfe064c3531c5628.tar.gz
nng-b310f712828962bf3187caf3bfe064c3531c5628.tar.bz2
nng-b310f712828962bf3187caf3bfe064c3531c5628.zip
fixes #595 mutex leak and other minor errors in TCP
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.
Diffstat (limited to 'src/platform/windows/win_io.c')
-rw-r--r--src/platform/windows/win_io.c11
1 files changed, 1 insertions, 10 deletions
diff --git a/src/platform/windows/win_io.c b/src/platform/windows/win_io.c
index 1179b603..50b22343 100644
--- a/src/platform/windows/win_io.c
+++ b/src/platform/windows/win_io.c
@@ -61,14 +61,13 @@ nni_win_io_register(HANDLE h)
}
int
-nni_win_io_init(nni_win_io *io, HANDLE f, nni_win_io_cb cb, void *ptr)
+nni_win_io_init(nni_win_io *io, nni_win_io_cb cb, void *ptr)
{
ZeroMemory(&io->olpd, sizeof(io->olpd));
io->cb = cb;
io->ptr = ptr;
io->aio = NULL;
- io->f = f;
io->olpd.hEvent = CreateEvent(NULL, FALSE, FALSE, NULL);
if (io->olpd.hEvent == NULL) {
return (nni_win_error(GetLastError()));
@@ -77,14 +76,6 @@ nni_win_io_init(nni_win_io *io, HANDLE f, nni_win_io_cb cb, void *ptr)
}
void
-nni_win_io_cancel(nni_win_io *io)
-{
- if (io->f != INVALID_HANDLE_VALUE) {
- CancelIoEx(io->f, &io->olpd);
- }
-}
-
-void
nni_win_io_fini(nni_win_io *io)
{
if (io->olpd.hEvent != NULL) {