QcSessionStates Namespace
The phases of a client session's connection; the phase itself is QcSessionState (QcClientSession::State, reported by QcClientSession::stateChanged()). More...
| Header: | #include <clientcore/session/QcSessionState.h> |
Types
| enum class | Ending { None, PeerClosed, Lost, Refused, ProtocolMismatch, LocalError } |
| enum class | State { Connecting, Loading, Playing, Disconnected } |
Detailed Description
Type Documentation
enum class QcSessionStates::Ending
Why a client session's connection ended (decision E-964).
| Constant | Value | Description |
|---|---|---|
QcSessionStates::Ending::None | 0 | Not ended. |
QcSessionStates::Ending::PeerClosed | 1 | The server closed the connection without a word. |
QcSessionStates::Ending::Lost | 2 | The connection broke (a socket error; the reason is its text). |
QcSessionStates::Ending::Refused | 3 | The server sent a Disconnect (QcClientSession::disconnectMessage()). |
QcSessionStates::Ending::ProtocolMismatch | 4 | The server speaks another protocol version. |
QcSessionStates::Ending::LocalError | 5 | This client ended the connection over an error of its own (a message it cannot take). |
enum class QcSessionStates::State
The phase of a client session's connection.
| Constant | Value | Description |
|---|---|---|
QcSessionStates::State::Connecting | 0 | Hello sent, waiting for the server's Welcome. |
QcSessionStates::State::Loading | 1 | Welcomed, waiting for the world and the first state of the player. |
QcSessionStates::State::Playing | 2 | In the world. |
QcSessionStates::State::Disconnected | 3 | The connection ended (QcClientSession::disconnectReason()). |