feat(SocketReactor): extract and expose poll() as a member function

This commit is contained in:
Alex Fabijanic
2021-04-26 18:17:23 +02:00
parent 54667890eb
commit 2d0609b10c
4 changed files with 233 additions and 75 deletions

View File

@@ -123,6 +123,12 @@ public:
virtual ~SocketReactor();
/// Destroys the SocketReactor.
int poll();
/// Polls all registered sockets and calls their respective handlers.
/// If there are no handlers, an idle notification is dispatched.
/// If there are no readable sockets, a timeout notification is dispatched.
/// Returns the total number of read/write/error handlers called.
void run();
/// Runs the SocketReactor. The reactor will run
/// until stop() is called (in a separate thread).