|
Zappy Server
C++ game server: world, rules, scheduler, network
|
Observer hooks for raw socket events (Observer pattern). More...
#include <INetworkObserver.hpp>
Inheritance diagram for INetworkObserver:
Collaboration diagram for INetworkObserver:Public Member Functions | |
| virtual | ~INetworkObserver ()=default |
| virtual void | onClientConnected (int connectionId)=0 |
A new client socket was accepted (assigned connectionId). | |
| virtual void | onClientDisconnected (int connectionId)=0 |
| A client socket closed or errored. | |
| virtual void | onLineReceived (int connectionId, const std::string &line)=0 |
| One complete ' '-terminated line arrived from the client. | |
| virtual void | onLineSent (int connectionId, const std::string &line)=0 |
| One line was queued to be sent to the client. | |
Observer hooks for raw socket events (Observer pattern).
ClientManager calls these when a socket connects, drops, or moves a line, so observers can react to traffic without ClientManager knowing about them.
Definition at line 11 of file INetworkObserver.hpp.
|
virtualdefault |
|
pure virtual |
A new client socket was accepted (assigned connectionId).
Implemented in LogObserver.
|
pure virtual |
A client socket closed or errored.
Implemented in LogObserver.
|
pure virtual |
One complete '
'-terminated line arrived from the client.
Implemented in LogObserver.
|
pure virtual |
One line was queued to be sent to the client.
Implemented in LogObserver.