version 1.73, 2004/08/16 10:55:53
|
version 1.74, 2004/08/16 13:59:43
|
|
|
return(handled_events); | return(handled_events); |
} | } |
| |
void Monitor::stopListeningForConnections() |
void Monitor::stopListeningForConnections(Boolean wait) |
{ | { |
PEG_METHOD_ENTER(TRC_HTTP, "Monitor::stopListeningForConnections()"); | PEG_METHOD_ENTER(TRC_HTTP, "Monitor::stopListeningForConnections()"); |
// set boolean then tickle the server to recognize _stopConnections | // set boolean then tickle the server to recognize _stopConnections |
_stopConnections = 1; | _stopConnections = 1; |
tickle(); | tickle(); |
| |
|
if (wait) |
|
{ |
// Wait for the monitor to notice _stopConnections. Otherwise the | // Wait for the monitor to notice _stopConnections. Otherwise the |
// caller of this function may unbind the ports while the monitor | // caller of this function may unbind the ports while the monitor |
// is still accepting connections on them. | // is still accepting connections on them. |
|
|
// The monitor is probably busy processng a very long request, and is | // The monitor is probably busy processng a very long request, and is |
// not accepting connections. Let the caller unbind the ports. | // not accepting connections. Let the caller unbind the ports. |
} | } |
|
} |
| |
PEG_METHOD_EXIT(); | PEG_METHOD_EXIT(); |
} | } |