version 1.2, 2001/12/13 14:53:58
|
version 1.6, 2002/02/20 23:12:04
|
|
|
// | // |
// Modified By: | // Modified By: |
// Jenny Yu, Hewlett-Packard Company (jenny_yu@hp.com) | // Jenny Yu, Hewlett-Packard Company (jenny_yu@hp.com) |
|
// Nag Boranna, Hewlett-Packard Company (nagaraja_boranna@hp.com) |
// | // |
//%///////////////////////////////////////////////////////////////////////////// | //%///////////////////////////////////////////////////////////////////////////// |
| |
|
|
//////////////////////////////////////////////////////////////////////////////// | //////////////////////////////////////////////////////////////////////////////// |
| |
HTTPAcceptor::HTTPAcceptor(Monitor* monitor, MessageQueue* outputMessageQueue) | HTTPAcceptor::HTTPAcceptor(Monitor* monitor, MessageQueue* outputMessageQueue) |
: _monitor(monitor), _outputMessageQueue(outputMessageQueue), _rep(0), |
: Base("HTTPAcceptor", MessageQueue::getNextQueueId()), |
_sslcontext(NULL) |
_monitor(monitor), _outputMessageQueue(outputMessageQueue), |
|
_rep(0), _sslcontext(NULL) |
{ | { |
|
|
Socket::initializeInterface(); | Socket::initializeInterface(); |
} | } |
| |
HTTPAcceptor::HTTPAcceptor(Monitor* monitor, MessageQueue* outputMessageQueue, | HTTPAcceptor::HTTPAcceptor(Monitor* monitor, MessageQueue* outputMessageQueue, |
SSLContext * sslcontext) | SSLContext * sslcontext) |
: _monitor(monitor), _outputMessageQueue(outputMessageQueue), _rep(0), |
: Base("HTTPAcceptor", MessageQueue::getNextQueueId()), |
|
_monitor(monitor), _outputMessageQueue(outputMessageQueue), _rep(0), |
_sslcontext(sslcontext) | _sslcontext(sslcontext) |
{ | { |
Socket::initializeInterface(); | Socket::initializeInterface(); |
|
|
// Create address: | // Create address: |
| |
memset(&_rep->address, 0, sizeof(_rep->address)); | memset(&_rep->address, 0, sizeof(_rep->address)); |
|
|
|
#ifdef PEGASUS_ACCEPT_ONLY_LOCAL_CONNECTIONS |
|
_rep->address.sin_addr.s_addr = INADDR_LOOPBACK; |
|
#else |
_rep->address.sin_addr.s_addr = INADDR_ANY; | _rep->address.sin_addr.s_addr = INADDR_ANY; |
|
#endif |
|
|
_rep->address.sin_family = AF_INET; | _rep->address.sin_family = AF_INET; |
_rep->address.sin_port = htons(_portNumber); | _rep->address.sin_port = htons(_portNumber); |
| |
|
|
| |
sockaddr_in address; | sockaddr_in address; |
| |
#if defined(PEGASUS_PLATFORM_ZOS_ZSERIES_IBM) |
#if defined(PEGASUS_PLATFORM_ZOS_ZSERIES_IBM) || defined(PEGASUS_PLATFORM_AIX_RS_IBMCXX) |
size_t n = sizeof(address); | size_t n = sizeof(address); |
#else | #else |
int n = sizeof(address); | int n = sizeof(address); |