This class dispatches event notifications to a list of Connections.
An EventLoop maintains a list of participating Connection objects, and periodically informs them about any events (e.g., read/write, errors, timeouts) that occur. The loop continues until something calls stop().
Creates a new EventLoop.
Adds c to this EventLoop's list of active Connections.
If shutdown() has been called already, addConnection() ignores c, so that shutdown proceeds unhampered. This is likely to disturb c a little, but it's better than the alternative: Aborting the shutdown.
Records that t exists, so that the event loop will process t.
Closes all Connections except c1 and c2. This helps TlsProxy do its work.
Closes all Connection except Listeners. When we fork, this allows us to keep the connections on one side of the fence.
Returns a (non-zero) pointer to the list of Connections that have been added to this EventLoop.
Dispatches events to the connection c, based on its current state, the time now and the results from select: r is true if the FD may be read, and w is true if we know that the FD may be written to. If now is past that Connection's timeout, we must send a Timeout event.
Flushes the write buffer of all connections.
Requests the event loop to collect garbage and clear any caches at the earliest opportunity. Used for debugging.
Returns a pointer to the global event loop, or 0 if setup() has not yet been called.
Returns true if this EventLoop is shutting down (ie. stop() has been called), and false if it's starting up or operating normally.
Returns true if this EventLoop is still attending to startup chores, and not yet processing Listener requests.
Returns whatever setMemoryUsage() has recorded, or 0 meaning to collect garbage often.
Removes c from this EventLoop's list of active Connections.
Forgets that t exists. The event loop will henceforth never call t.
Scans the event loop and stores the current number of different connections using GraphableNumber.
Instructs this event loop to collect garbage when memory usage passes limit bytes. The default is 0, which means to collect garbage even if very little is being used.
Sets the startup state of this EventLoop to p. If p is true, then Listeners will not be processed until this function is called again with p set to false.
Creates the global EventLoop object or, if l is non-zero, sets the global EventLoop to l. This function expects to be called very early during the startup sequence.
Stops all the SSL-enabled Listeners.
Starts the EventLoop and runs it until stop() is called.
Instructs this EventLoop to perform an orderly shutdown in s seconds, by sending each participating Connection a Shutdown event before closing.
Listener connections are closed right away, some/all external connections get a Shutdown event at once, everyone get a Shutdown event at final shutdown.
Exists only to avoid compiler warnings.
This web page based on source code belonging to The Archiveopteryx Developers. All rights reserved.