TcpConnectionState.bindToAnyAddress

private int bindToAnyAddress(SOCKET sock, int family) @trusted nothrow

Bind socket to any available local address.

ConnectEx requires the socket to be bound before use.

Parameters

sockSocket to bind.
familyAddress family (AF_INET or AF_INET6).

Returns

0 on success, -1 on failure.