Unset foreign address and port.
Definition at line 310 of file PracticalSocket.cpp. References CommunicatingSocket::connect(), and Socket::sockDesc. 00310 { 00311 sockaddr_in nullAddr; 00312 memset(&nullAddr, 0, sizeof(nullAddr)); 00313 nullAddr.sin_family = AF_UNSPEC; 00314 00315 // Try to disconnect 00316 if (::connect(sockDesc, (sockaddr *) &nullAddr, sizeof(nullAddr)) < 0) { 00317 #ifdef WIN32 00318 if (errno != WSAEAFNOSUPPORT) { 00319 #else 00320 if (errno != EAFNOSUPPORT) { 00321 #endif 00322 throw SocketException("Disconnect failed (connect())", true); 00323 } 00324 } 00325 }
Here is the call graph for this function:
|