version 1.18, 2005/02/05 22:59:24
|
version 1.19, 2005/03/14 08:43:03
|
|
|
// | // |
// Author: Mike Brasher (mbrasher@bmc.com) | // Author: Mike Brasher (mbrasher@bmc.com) |
// | // |
// Modified By: |
// Modified By: Josephine Eskaline Joyce, IBM (jojustin@in.ibm.com) for Bug#2513 |
// | // |
//%///////////////////////////////////////////////////////////////////////////// | //%///////////////////////////////////////////////////////////////////////////// |
| |
|
|
| |
void Socket::close(Sint32 socket) | void Socket::close(Sint32 socket) |
{ | { |
|
if(-1 != socket) |
|
{ |
#ifdef PEGASUS_OS_TYPE_WINDOWS | #ifdef PEGASUS_OS_TYPE_WINDOWS |
closesocket(socket); |
if(!closesocket(socket)) socket=-1; |
#else | #else |
#if (__GNUC__) && !defined(PEGASUS_OS_SOLARIS) && !defined(PEGASUS_OS_DARWIN) && !defined(PEGASUS_OS_LSB) | #if (__GNUC__) && !defined(PEGASUS_OS_SOLARIS) && !defined(PEGASUS_OS_DARWIN) && !defined(PEGASUS_OS_LSB) |
TEMP_FAILURE_RETRY(::close(socket)); |
if(!TEMP_FAILURE_RETRY(::close(socket))) socket = -1; |
#else | #else |
::close(socket); |
if(!::close(socket)) socket = -1; |
#endif | #endif |
#endif | #endif |
} | } |
|
} |
| |
int Socket::close2(Sint32 socket) | int Socket::close2(Sint32 socket) |
{ | { |