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

void Socket::cleanUp (  )  throw (SocketException) [static]

If WinSock, unload the WinSock DLLs; otherwise do nothing.

We ignore this in our sample client code but include it in the library for completeness. If you are running on Windows and you are concerned about DLL resource consumption, call this after you are done with all Socket instances. If you execute this on Windows while some instance of Socket exists, you are toast. For portability of client code, this is an empty function on non-Windows platforms so you can always include it.

Parameters:
buffer buffer to receive the data
bufferLen maximum number of bytes to read into buffer
Returns:
number of bytes read, 0 for EOF, and -1 for error
Exceptions:
SocketException thrown WinSock clean up fails

Definition at line 157 of file PracticalSocket.cpp.

00157                                             {
00158   #ifdef WIN32
00159     if (WSACleanup() != 0) {
00160       throw SocketException("WSACleanup() failed");
00161     }
00162   #endif
00163 }


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