SmartFoxServer 3 C++ Client API 3.1.0-beta
Client API for SmartFoxServer 3
Loading...
Searching...
No Matches
sfs3::net::ClientDisconnectionReason Namespace Reference

The reasons why a disconnection from the server can happen. More...

Variables

constexpr std::string_view IDLE = "Idle"
 The client was idle for too long.
constexpr std::string_view KICKED = "Kicked"
 The client was kicked out of the server.
constexpr std::string_view BANNED = "Banned"
 The client was banned from the server.
constexpr std::string_view MANUAL = "Manual"
 The client disconnected on its own, through a call to sfs3::SmartFox::disconnect.
constexpr std::string_view RECONNECTION_FAILURE = "Reconnection failure"
 The reconnection system could not re-establish the connection to the server.
constexpr std::string_view UNSTABLE_UDP_CONNECTION = "Unstable UDP Connection"
 The client is losing too many packets, and the RDP configuration in use does not recover from packet loss.
constexpr std::string_view UDP_TIMEOUT = "UDP Connection timed out"
 The client sent no data for a while and the server closed the UDP connection.
constexpr std::string_view UNKNOWN = "Unknown"
 A generic network error happened and the client cannot tell what caused the disconnection.

Detailed Description

The reasons why a disconnection from the server can happen.

The reason of a disconnection is carried by the event dispatched when the connection is lost.

See also
event::SFSEvent::CONNECTION_LOST

Variable Documentation

◆ IDLE

std::string_view sfs3::net::ClientDisconnectionReason::IDLE = "Idle"
inlineconstexpr

The client was idle for too long.

The timeout depends on the server settings.

◆ KICKED

std::string_view sfs3::net::ClientDisconnectionReason::KICKED = "Kicked"
inlineconstexpr

The client was kicked out of the server.

A kick can be automatic, for example for swearing when the words filter is active, or it can come from a user with enough privileges, such as an administrator or a moderator.

◆ BANNED

std::string_view sfs3::net::ClientDisconnectionReason::BANNED = "Banned"
inlineconstexpr

The client was banned from the server.

A ban can be automatic, for example for flooding when the flood filter is active, or it can come from a user with enough privileges, such as an administrator or a moderator.

◆ UDP_TIMEOUT

std::string_view sfs3::net::ClientDisconnectionReason::UDP_TIMEOUT = "UDP Connection timed out"
inlineconstexpr

The client sent no data for a while and the server closed the UDP connection.

To keep it alive, set the udpKeepAlive setting of the Zone to true.

◆ UNKNOWN

std::string_view sfs3::net::ClientDisconnectionReason::UNKNOWN = "Unknown"
inlineconstexpr

A generic network error happened and the client cannot tell what caused the disconnection.

Look for errors or warnings in the server log.