|
R-Type
Distributed multiplayer game engine in C++
|
Event representing a connection state change. More...
#include <NetworkEvent.hpp>


Public Types | |
| enum class | Status { CONNECTED , DISCONNECTED , FAILED } |
| Connection status states. More... | |
Public Member Functions | |
| ConnectionEvent (Status status, const std::string &message="") | |
| Construct a connection event. | |
| Status | getStatus () const |
| Get the connection status. | |
| const std::string & | getMessage () const |
| Get the status message. | |
Public Member Functions inherited from IEvent | |
| virtual | ~IEvent ()=default |
| Virtual destructor. | |
Private Attributes | |
| Status | _status |
| Connection status. | |
| std::string | _message |
| Optional status message. | |
Event representing a connection state change.
ConnectionEvent signals changes in the client-server connection:
Published by Replicator when connection state changes. Subscribed by UI systems to show connection status.
Definition at line 118 of file NetworkEvent.hpp.
|
strong |
Connection status states.
| Enumerator | |
|---|---|
| CONNECTED | Successfully connected to server. |
| DISCONNECTED | Disconnected from server. |
| FAILED | Connection attempt failed. |
Definition at line 124 of file NetworkEvent.hpp.
|
inlineexplicit |
Construct a connection event.
| status | Connection status |
| message | Optional status message (e.g., error description) |
Definition at line 136 of file NetworkEvent.hpp.
|
inline |
Get the status message.
Definition at line 149 of file NetworkEvent.hpp.
References _message.
|
inline |
Get the connection status.
Definition at line 143 of file NetworkEvent.hpp.
References _status.
|
private |
Optional status message.
Definition at line 153 of file NetworkEvent.hpp.
Referenced by getMessage().
|
private |