From 569b75e05033e129e826297360d1d6db7fdbbf97 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=B6nke=20Ludwig?= Date: Sun, 12 Nov 2017 14:34:58 +0100 Subject: [PATCH] More detailed documentation for cancelConnectStream(). --- source/eventcore/driver.d | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/source/eventcore/driver.d b/source/eventcore/driver.d index c05181b..8b4f07c 100644 --- a/source/eventcore/driver.d +++ b/source/eventcore/driver.d @@ -128,6 +128,19 @@ interface EventDriverSockets { StreamSocketFD connectStream(scope Address peer_address, scope Address bind_address, ConnectCallback on_connect); /** Aborts asynchronous connect by closing the socket. + + This function may only invoked if the connection state is + `ConnectionState.connecting`. It will cancel the connection attempt and + guarantees that the connection callback will not be invoked in the + future. + + Note that upon completion, the socket handle will be invalid, regardless + of the number of calls to `addRef`, and must not be used for further + operations. + + Params: + sock = Handle of the socket that is currently establishing a + connection */ void cancelConnectStream(StreamSocketFD sock);