Home || Architecture || Video Search || Visual Search || Scripts || Applications || Important Messages || OGL || Src

void UDPSocket::disconnect (  )  throw (SocketException)

Unset foreign address and port.

Returns:
true if disassociation is successful
Exceptions:
SocketException thrown if unable to disconnect UDP socket

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:


Generated on Fri Mar 19 10:32:58 2010 for ImpalaSrc by  doxygen 1.5.1