![]() |
Close() |
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() |
| Public Function |
Declared in: SpoofSocket.h |
Declarationvirtual BOOL Close();
DescriptionClose the socket
Function Body
try
{
//Close the socket
//Quit if not ok
if (!ValidSocket())
return FALSE;
//Close it
#ifdef WIN32
if (closesocket(GetHandle())==SOCKET_ERROR)
{
//Error in closing ?
SetLastError("Close");
return FALSE;
}
#else
if (!close(GetHandle()))
{
//Error in closing ?
SetLastError("Close");
return FALSE;
}
#endif
//Set the socket to invalid
m_SpoofSocket=INVALID_SOCKET;
return TRUE;
}
ERROR_HANDLER_RETURN("Close",FALSE)
See Also
This web site was generated
using Surveyor V4.50.811.1. Click
here
for more information. |
Site content copyright © 2001 Barak Weichselbaum. See the About page for additional notices. This page last updated: 27 Jun 2001. |