version 1.67, 2005/05/16 15:22:15
|
version 1.68, 2005/05/16 16:11:12
|
|
|
if (! message) | if (! message) |
return; | return; |
| |
|
PEGASUS_ASSERT(_rep != 0); |
switch (message->getType()) | switch (message->getType()) |
{ | { |
case SOCKET_MESSAGE: | case SOCKET_MESSAGE: |
|
|
void HTTPAcceptor::_bind() | void HTTPAcceptor::_bind() |
{ | { |
| |
|
PEGASUS_ASSERT(_rep != 0); |
// Create address: | // Create address: |
| |
memset(_rep->address, 0, sizeof(*_rep->address)); | memset(_rep->address, 0, sizeof(*_rep->address)); |
|
|
Uint32 HTTPAcceptor::getOutstandingRequestCount() const | Uint32 HTTPAcceptor::getOutstandingRequestCount() const |
{ | { |
Uint32 count = 0; | Uint32 count = 0; |
|
if (_rep) |
|
{ |
AutoMutex autoMut(_rep->_connection_mut); | AutoMutex autoMut(_rep->_connection_mut); |
if (_rep->connections.size() > 0) | if (_rep->connections.size() > 0) |
{ | { |
HTTPConnection* connection = _rep->connections[0]; | HTTPConnection* connection = _rep->connections[0]; |
count = connection->getRequestCount(); | count = connection->getRequestCount(); |
} | } |
|
} |
return count; | return count; |
} | } |
| |
|
|
void HTTPAcceptor::destroyConnections() | void HTTPAcceptor::destroyConnections() |
{ | { |
| |
|
if (_rep) |
|
{ |
// For each connection created by this object: | // For each connection created by this object: |
| |
AutoMutex autoMut(_rep->_connection_mut); | AutoMutex autoMut(_rep->_connection_mut); |
|
|
} | } |
| |
_rep->connections.clear(); | _rep->connections.clear(); |
|
} |
} | } |
| |
void HTTPAcceptor::_acceptConnection() | void HTTPAcceptor::_acceptConnection() |