|
|
void | setIsServer (bool b) |
| | Sets if this instance is a server or client.
|
| |
|
void | setClientPort (uint16_t port) |
| | Sets the port on which a client listens for server connection.
|
| |
|
uint16_t | getClientPort () const |
| | Returns the port on which a client listens for server connections.
|
| |
|
void | setIsPublicServer () |
| | Sets that this server can be contacted directly.
|
| |
|
bool | isPublicServer () const |
| | Returns if connections directly to the server are to be accepted.
|
| |
| bool | isNetworking () const |
| | Return if a network setting is happening. More...
|
| |
|
bool | isLAN () const |
| | Return true if it's a networked game with a LAN server.
|
| |
|
bool | isWAN () const |
| | Return true if it's a networked game but with a WAN server.
|
| |
|
void | setIsLAN () |
| | Set that this is a LAN networked game.
|
| |
|
void | setIsWAN () |
| | Set that this is a WAN networked game.
|
| |
|
void | unsetNetworking () |
| | Set that this is not a networked game.
|
| |
|
std::vector< std::tuple< InputDevice *, PlayerProfile *, HandicapLevel > > & | getNetworkPlayers () |
| |
|
bool | isAddingNetworkPlayers () const |
| |
|
void | doneAddingNetworkPlayers () |
| |
|
bool | addNetworkPlayer (InputDevice *device, PlayerProfile *profile, HandicapLevel h) |
| |
|
bool | playerExists (PlayerProfile *profile) const |
| |
|
void | cleanNetworkPlayers () |
| |
|
bool | isServer () const |
| | Returns if this instance is a server.
|
| |
|
bool | isClient () const |
| | Returns if this instance is a client.
|
| |
|
void | setAutoConnect (bool b) |
| | Sets if a client should immediately connect to the first server.
|
| |
|
bool | isAutoConnect () const |
| | Returns if an immediate connection to the first server was requested.
|
| |
|
void | setNetworkAIInstance (bool b) |
| |
|
bool | isNetworkAIInstance () const |
| |
|
void | setCurrentUserId (uint32_t id) |
| |
|
void | setCurrentUserToken (const std::string &t) |
| |
|
uint32_t | getCurrentUserId () const |
| |
|
const std::string & | getCurrentUserToken () const |
| |
|
void | setUserDetails (std::shared_ptr< Online::XMLRequest > r, const std::string &name) |
| |
|
void | setServerDetails (std::shared_ptr< Online::XMLRequest > r, const std::string &name) |
| |
|
void | setServerIdFile (const std::string &id) |
| |
|
const std::string & | getServerIdFile () const |
| |
|
std::vector< GUIEngine::Screen * > | getResetScreens (bool lobby=false) const |
| |
|
void | setJoinedServerVersion (uint32_t v) |
| |
|
uint32_t | getJoinedServerVersion () const |
| |
|
void | clearActivePlayersForClient () const |
| | Called before (re)starting network race, must be used before adding split screen players.
|
| |
|
void | setStateFrequency (int frequency) |
| |
|
int | getStateFrequency () const |
| |
|
bool | roundValuesNow () const |
| | True when client needs to round the bodies phyiscal info for current ticks, server doesn't as it will be done implictly in save state.
|
| |
|
void | setServerCapabilities (std::set< std::string > &caps) |
| |
|
void | clearServerCapabilities () |
| |
|
const std::set< std::string > & | getServerCapabilities () const |
| |
|
void | getIPDetectionResult (uint64_t timeout) |
| | Use stun servers to detect current ip type.
|
| |
|
IPType | getIPType () const |
| |
|
void | setIPType (IPType ip_type) |
| |
|
const std::string & | getNAT64Prefix () const |
| |
|
const std::array< uint32_t, 8 > & | getNAT64PrefixData () const |
| |
|
void | initClientPort () |
| | Separated from constructor because this needs to be run after user config is load.
|
| |
|
void | setNumFixedAI (unsigned num) |
| |
|
unsigned | getNumFixedAI () const |
| |
|
void | setTuxHitboxAddon (bool val) |
| |
|
bool | useTuxHitboxAddon () const |
| |
|
|
std::atomic< IPType > | m_ip_type |
| |
|
std::atomic< NetworkType > | m_network_type |
| | Keeps the type of network connection: none (yet), LAN or WAN.
|
| |
| bool | m_is_public_server |
| | If set it allows clients to connect directly to this server without using the stk server in between. More...
|
| |
|
std::atomic_bool | m_is_server |
| | True if this host is a server, false otherwise.
|
| |
|
bool | m_auto_connect |
| | True if a client should connect to the first server it finds and immediately start a race.
|
| |
|
bool | m_done_adding_network_players |
| |
| bool | m_network_ai_instance |
| | True if this STK instance is an AI instance which is used for server AI. More...
|
| |
|
bool | m_tux_hitbox_addon |
| | When live join is disabled addon kart will use their real hitbox.
|
| |
| unsigned | m_num_fixed_ai |
| | No. More...
|
| |
|
uint16_t | m_client_port |
| | The LAN port on which a client is waiting for a server connection.
|
| |
|
uint32_t | m_cur_user_id |
| | Used by wan server.
|
| |
|
std::string | m_cur_user_token |
| |
|
std::string | m_server_id_file |
| | Used by client server to determine if the child server is created.
|
| |
|
std::vector< std::tuple< InputDevice *, PlayerProfile *, HandicapLevel > > | m_network_players |
| |
|
uint32_t | m_joined_server_version |
| |
|
int | m_state_frequency |
| | Set by client or server which is required to be the same.
|
| |
|
std::set< std::string > | m_server_capabilities |
| | List of server capabilities set when joining it, to determine features available in same version.
|
| |
| std::string | m_nat64_prefix |
| | For IPv6 only network we try to detect the NAT64 prefix so we can use it to connect to ipv4 only servers. More...
|
| |
|
std::array< uint32_t, 8 > | m_nat64_prefix_data |
| |
This class is the interface between STK and the online code, particularly STKHost.
It stores all online related properties (e.g. if this is a server or a host, name of the server, maximum number of players, ip address, ...). They can either be set from the GUI code, or via the command line (for a stand-alone server). When STKHost is created, it takes all necessary information from this instance.