diff options
Diffstat (limited to 'include/sysutils')
-rw-r--r-- | include/sysutils/SocketListener.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/include/sysutils/SocketListener.h b/include/sysutils/SocketListener.h index 649c89a..c204a0f 100644 --- a/include/sysutils/SocketListener.h +++ b/include/sysutils/SocketListener.h @@ -44,10 +44,13 @@ public: void runOnEachSocket(SocketClientCommand *command); + bool release(SocketClient *c) { return release(c, true); } + protected: virtual bool onDataAvailable(SocketClient *c) = 0; private: + bool release(SocketClient *c, bool wakeup); static void *threadStart(void *obj); void runListener(); void init(const char *socketName, int socketFd, bool listen, bool useCmdNum); |