diff options
Diffstat (limited to 'common/network/Socket.h')
-rw-r--r-- | common/network/Socket.h | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/common/network/Socket.h b/common/network/Socket.h index 378a9006..13b12d1d 100644 --- a/common/network/Socket.h +++ b/common/network/Socket.h @@ -125,12 +125,17 @@ namespace network { // resources to be freed. virtual void removeSocket(network::Socket* sock) = 0; - // processSocketEvent() tells the server there is a Socket read event. + // processSocketReadEvent() tells the server there is a Socket read event. // The implementation can indicate that the Socket is no longer active // by calling shutdown() on it. The caller will then call removeSocket() // soon after processSocketEvent returns, to allow any pre-Socket // resources to be tidied up. - virtual void processSocketEvent(network::Socket* sock) = 0; + virtual void processSocketReadEvent(network::Socket* sock) = 0; + + // processSocketReadEvent() tells the server there is a Socket write event. + // This is only necessary if the Socket has been put in non-blocking + // mode and needs this callback to flush the buffer. + virtual void processSocketWriteEvent(network::Socket* sock) = 0; // checkTimeouts() allows the server to check socket timeouts, etc. The // return value is the number of milliseconds to wait before |