version 1.71, 2007/06/26 20:26:13
|
version 1.75.2.1, 2007/11/08 23:20:48
|
|
|
#ifndef mode_t | #ifndef mode_t |
typedef unsigned long mode_t; | typedef unsigned long mode_t; |
#endif | #endif |
|
#include <windows.h> |
#endif | #endif |
| |
#if defined (PEGASUS_OS_TYPE_UNIX) || (PEGASUS_OS_VMS) | #if defined (PEGASUS_OS_TYPE_UNIX) || (PEGASUS_OS_VMS) |
|
|
// address (ipv4 or ipv6) returned. Address will be copied to dst. | // address (ipv4 or ipv6) returned. Address will be copied to dst. |
static Boolean _acquireIP(const char* hostname, int *af, void *dst); | static Boolean _acquireIP(const char* hostname, int *af, void *dst); |
| |
|
/** |
|
Returns true if IPv6 stack is active by checking return code from |
|
Socket::createSocket() and getSocketError() calls. |
|
|
|
ATTN: We return true if some error other than |
|
PEGASUS_INVALID_ADDRESS_FAMILY is returned while creating the socket |
|
because we will not be sure whether the IPv6 stack is active or not |
|
from the returned error code. Return value of "true" from this method |
|
should not be trusted absolutely. |
|
*/ |
|
#ifdef PEGASUS_ENABLE_IPV6 |
|
static Boolean isIPv6StackActive(); |
|
#endif |
|
|
static Uint32 lookupPort( | static Uint32 lookupPort( |
const char * serviceName, | const char * serviceName, |
Uint32 defaultPort); | Uint32 defaultPort); |
|
|
{ | { |
public: | public: |
| |
AutoFileLock(const char* fileName); |
/** Perform lock only when performLock is true. |
|
*/ |
|
AutoFileLock(const char* fileName, bool performLock = true); |
~AutoFileLock(); | ~AutoFileLock(); |
| |
private: | private: |
|
|
AutoFileLock(const AutoFileLock&); | AutoFileLock(const AutoFileLock&); |
AutoFileLock& operator=(const AutoFileLock&); | AutoFileLock& operator=(const AutoFileLock&); |
| |
|
bool _performLock; |
#ifdef PEGASUS_OS_TYPE_UNIX | #ifdef PEGASUS_OS_TYPE_UNIX |
struct flock _fl; | struct flock _fl; |
int _fd; | int _fd; |
#endif | #endif |
|
#ifdef PEGASUS_OS_TYPE_WINDOWS |
|
HANDLE _hFile; |
|
#endif |
}; | }; |
| |
PEGASUS_NAMESPACE_END | PEGASUS_NAMESPACE_END |