Skip to content

Commit

Permalink
Add start() method #4833
Browse files Browse the repository at this point in the history
  • Loading branch information
vrabac6 committed Jan 2, 2025
1 parent c9dc1f9 commit 1bb4c1b
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
3 changes: 3 additions & 0 deletions Net/include/Poco/Net/SocketReactor.h
Original file line number Diff line number Diff line change
Expand Up @@ -186,6 +186,9 @@ class Net_API SocketReactor: public Poco::Runnable
/// until stop() is called (in a separate thread).
/// Can be overriden by inheriting classes.

void start();
/// Starts the SocketReactor.

void stop();
/// Stops the SocketReactor.
///
Expand Down
6 changes: 6 additions & 0 deletions Net/src/SocketReactor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,12 @@ void SocketReactor::sleep()
}


void SocketReactor::start()
{
_stop.exchange(false);
}


void SocketReactor::stop()
{
if (_stop.exchange(true)) return;
Expand Down

0 comments on commit 1bb4c1b

Please sign in to comment.