(int, int) = ConnectEx(s, name
, Overlapped
, SendBuffer
)
Version of connect that uses Overlapped I/O
ConnectEx(sock, (addr, port), buf, overlap)
Parameters
s : PySocket
/int
A bound, unconnected socket that will be used to connectname : tuple
Address to connect to (host, port)Overlapped : PyOVERLAPPED
An overlapped structureSendBuffer=None : buffer
Buffer to send on the socket after connect
Return Value
Returns the completion code and number of bytes sent.
The completion code will be 0 for a completed operation, or ERROR_IO_PENDING for a pending overlapped operation.
If the platform does not support ConnectEx (eg, Windows 2000), an
exception will be thrown indicating the WSAIoctl function (which is used to
fetch the function pointer) failed with error code WSAEINVAL (10022).