diff --git a/Net/include/Poco/Net/SocketReactor.h b/Net/include/Poco/Net/SocketReactor.h index cd14d9615..57aa51b91 100644 --- a/Net/include/Poco/Net/SocketReactor.h +++ b/Net/include/Poco/Net/SocketReactor.h @@ -186,6 +186,9 @@ public: /// until stop() is called (in a separate thread). /// Can be overriden by inheriting classes. + void start(); + /// Starts the SocketReactor. + void stop(); /// Stops the SocketReactor. /// diff --git a/Net/src/SocketReactor.cpp b/Net/src/SocketReactor.cpp index 41e9250ea..0aebd5bb3 100644 --- a/Net/src/SocketReactor.cpp +++ b/Net/src/SocketReactor.cpp @@ -157,6 +157,12 @@ void SocketReactor::sleep() } +void SocketReactor::start() +{ + _stop.exchange(false); +} + + void SocketReactor::stop() { if (_stop.exchange(true)) return;