cancelConnectStream for Posix

This commit is contained in:
Boris-Barboris 2017-11-11 01:14:54 +00:00
parent 8d7c1e3c96
commit 0cac9d56e0
4 changed files with 38 additions and 6 deletions

View file

@ -127,6 +127,10 @@ interface EventDriverSockets {
*/
StreamSocketFD connectStream(scope Address peer_address, scope Address bind_address, ConnectCallback on_connect);
/** Aborts asynchronous connect by closing the socket.
*/
void cancelConnectStream(StreamSocketFD sock);
/** Adopts an existing stream socket.
The given socket must be in a connected state. It will be automatically
@ -553,7 +557,8 @@ enum ConnectStatus {
refused,
timeout,
bindFailure,
unknownError
unknownError,
cancelled
}
enum ConnectionState {