TCPConnection and async improvements.

- asyncAwaitAny now takes the callback type, so that parameter storage classes are handled correctly
- Implement TCPConnection.remoteAddress/localAddress
- Implement TCPConnection.tcpNoDelay, keepAlive and readTimeout
- Implement timeout handling for TCPConnection.waitForData
This commit is contained in:
Sönke Ludwig 2017-01-15 20:59:36 +01:00
parent d1fad2c98b
commit f015662a94
3 changed files with 136 additions and 53 deletions

View file

@ -1093,7 +1093,8 @@ private struct ThreadLocalWaiter {
Waitable!(
cb => w.wait(cb),
cb => w.cancel()
cb => w.cancel(),
typeof(Waiter.notifier)
) waitable;
void removeWaiter()
@ -1124,7 +1125,7 @@ private struct ThreadLocalWaiter {
}
},
cb => eventDriver.events.cancelWait(evt, cb),
EventID
EventCallback
) ewaitable;
asyncAwaitAny!interruptible(timeout, waitable, ewaitable);
} else {