poco
poco copied to clipboard
SocketReactor: Remove not useful handlers calls
There are handler calls in the SocketReactor::run()
that are of no use (onIdle()
), or little use (onBusy()
).
These calls will be removed from SocketReactor::run()
. Subscribers to these events will have to overide the run() function to keep the functionality.
onIdle and onBusy handlers, can be usefull to handle a dead socket, for example a socket that do not send you nothing for X seconds. That was the main reason I use it now
Agreed with @micheleselea . One need a way to smoothly cleanup the socket space otherwise, one could get an exhaust exception
I'm not following, onIdle()
was called when there are no socket handlers - who's there to handle the idle notification?
When there are registered handlers but no activity, there is timeout notification:
https://github.com/pocoproject/poco/blob/5c3f827c8639a996dd0d27a77f48d343ed6fe524/Net/include/Poco/Net/SocketReactor.h#L88-L92
In any case, SocketReactor
is a Runnable
, which means user can override the run()
to do whatever necessary for their requirements - we can't be all things to all people.
yes @aleks-f you are right, it's onBusy that do the "socket checker" in my project and I already had to extend the SocketReacor
This issue is stale because it has been open for 365 days with no activity.
This issue was closed because it has been inactive for 60 days since being marked as stale.