SmartFoxServer 3 C++ Client API 3.1.0-beta
Client API for SmartFoxServer 3
Loading...
Searching...
No Matches
ISocketClient.h File Reference

Doxygen only documents namespace-scope entities (enums, aliases, constants, free functions) in a header that carries this block. More...

#include "core/rdp/TxpMode.h"
#include "entities/ByteBuffer.h"
#include "log/Log.h"
#include <optional>
#include <string>
#include <string_view>

Enumerations

enum class  sfs3::net::TransportType : int { TCP , UDP , UDP_RELIABLE , UDP_UNRELIABLE }
 The transport that carries a request to the server. More...

Functions

bool sfs3::net::isUdpTransport (TransportType txType)
 Tells whether a transport is one of the UDP modes.

Detailed Description

Doxygen only documents namespace-scope entities (enums, aliases, constants, free functions) in a header that carries this block.

Enumeration Type Documentation

◆ TransportType

enum class sfs3::net::TransportType : int
strong

The transport that carries a request to the server.

A request travels over TCP unless it asks for one of the UDP modes, which need a UDP connection to be up. The UDP modes trade reliability for speed: pick the weakest one that your data can live with.

See also
sfs3::requests::ExtensionRequest
Enumerator
TCP 

Standard TCP transport: ordered and reliable.

UDP 

Standard UDP transport: neither ordered nor reliable.

The fastest of the three.

UDP_RELIABLE 

Ordered and reliable UDP transport: lost packets are sent again.

UDP_UNRELIABLE 

Ordered but unreliable UDP transport: what is lost stays lost, but packets that arrive late or twice are dropped, so the ones you get are always in order.

Function Documentation

◆ isUdpTransport()

bool sfs3::net::isUdpTransport ( TransportType txType)
inline

Tells whether a transport is one of the UDP modes.

Parameters
txTypethe transport to test
Returns
true for UDP, UDP_RELIABLE and UDP_UNRELIABLE; false for TCP