#include <clientiface.h>
|
| ClientInterface (const std::shared_ptr< con::IConnection > &con) |
|
| ~ClientInterface () |
|
void | step (float dtime) |
|
std::vector< session_t > | getClientIDs (ClientState min_state=CS_Active) |
|
void | markBlocksNotSent (const std::vector< v3s16 > &positions) |
|
bool | isUserLimitReached () |
| Verify if user limit was reached.
|
|
const std::vector< std::string > & | getPlayerNames () const |
|
void | send (session_t peer_id, NetworkPacket *pkt) |
|
void | sendCustom (session_t peer_id, u8 channel, NetworkPacket *pkt, bool reliable) |
|
void | sendToAll (NetworkPacket *pkt) |
|
void | DeleteClient (session_t peer_id) |
|
void | CreateClient (session_t peer_id) |
|
RemoteClient * | getClientNoEx (session_t peer_id, ClientState state_min=CS_Active) |
|
RemoteClient * | lockedGetClientNoEx (session_t peer_id, ClientState state_min=CS_Active) |
|
ClientState | getClientState (session_t peer_id) |
|
void | setPlayerName (session_t peer_id, const std::string &name) |
|
u16 | getProtocolVersion (session_t peer_id) |
|
void | setClientVersion (session_t peer_id, u8 major, u8 minor, u8 patch, const std::string &full) |
|
void | event (session_t peer_id, ClientStateEvent event) |
|
void | setEnv (ServerEnvironment *env) |
|
◆ ClientInterface()
ClientInterface::ClientInterface |
( |
const std::shared_ptr< con::IConnection > & | con | ) |
|
◆ ~ClientInterface()
ClientInterface::~ClientInterface |
( |
| ) |
|
◆ CreateClient()
void ClientInterface::CreateClient |
( |
session_t | peer_id | ) |
|
◆ DeleteClient()
void ClientInterface::DeleteClient |
( |
session_t | peer_id | ) |
|
◆ event()
References CSE_Disconnect, CSE_SetClientReady, CSE_SetDenied, event(), m_clients, m_clients_mutex, and UpdatePlayerList().
Referenced by Server::acceptAuth(), Server::deletingPeer(), Server::DenyAccess(), event(), Server::handleCommand_ClientReady(), Server::handleCommand_FirstSrp(), Server::handleCommand_Init(), and Server::handleCommand_Init2().
◆ getClientIDs()
References m_clients, and m_clients_mutex.
Referenced by Server::DeleteClient(), Server::handleChat(), Server::handleCommand_Init(), isUserLimitReached(), Server::kickAllPlayers(), Server::playSound(), Server::reportPrivsModified(), Server::SendAddParticleSpawner(), Server::SendBlocks(), Server::sendMetadataChanged(), Server::sendNodeChangePkt(), Server::SendSpawnParticle(), Server::setIpBanned(), and UpdatePlayerList().
◆ getClientList()
◆ getClientNoEx()
◆ getClientState()
◆ getPlayerNames()
const std::vector< std::string > & ClientInterface::getPlayerNames |
( |
| ) |
const |
|
inline |
◆ getProtocolVersion()
u16 ClientInterface::getProtocolVersion |
( |
session_t | peer_id | ) |
|
◆ isUserLimitReached()
bool ClientInterface::isUserLimitReached |
( |
| ) |
|
◆ lockedGetClientNoEx()
◆ markBlocksNotSent()
void ClientInterface::markBlocksNotSent |
( |
const std::vector< v3s16 > & | positions | ) |
|
◆ send()
◆ sendCustom()
◆ sendToAll()
References clientCommandFactoryTable, FATAL_ERROR_IF, NetworkPacket::getCommand(), m_clients, m_clients_mutex, m_con, and con::IConnection::Send().
Referenced by Server::DeleteClient(), Server::SendChatMessage(), Server::SendDeleteParticleSpawner(), Server::sendDetachedInventory(), Server::SendTimeOfDay(), and Server::StageTwoClientInit().
◆ setClientVersion()
void ClientInterface::setClientVersion |
( |
session_t | peer_id, |
|
|
u8 | major, |
|
|
u8 | minor, |
|
|
u8 | patch, |
|
|
const std::string & | full ) |
◆ setEnv()
◆ setPlayerName()
void ClientInterface::setPlayerName |
( |
session_t | peer_id, |
|
|
const std::string & | name ) |
◆ state2Name()
std::string ClientInterface::state2Name |
( |
ClientState | state | ) |
|
|
static |
◆ step()
void ClientInterface::step |
( |
float | dtime | ) |
|
References CS_Created, CS_HelloSent, CS_Invalid, con::IConnection::DisconnectPeer(), con::IConnection::GetPeerAddress(), infostream, LINGER_TIMEOUT, m_check_linger_timer, m_clients, m_clients_mutex, m_con, m_print_info_timer, Address::serializeString(), state2Name(), UpdatePlayerList(), and warningstream.
Referenced by Server::AsyncRunStep().
◆ UpdatePlayerList()
void ClientInterface::UpdatePlayerList |
( |
| ) |
|
|
private |
◆ Server
◆ LINGER_TIMEOUT
int ClientInterface::LINGER_TIMEOUT = 10 |
|
staticconstexprprivate |
◆ m_check_linger_timer
float ClientInterface::m_check_linger_timer = 0 |
|
private |
◆ m_clients
Referenced by ~ClientInterface(), CreateClient(), DeleteClient(), event(), getClientIDs(), getClientList(), getClientNoEx(), getClientState(), getProtocolVersion(), lockedGetClientNoEx(), markBlocksNotSent(), sendToAll(), setClientVersion(), setPlayerName(), and step().
◆ m_clients_mutex
std::recursive_mutex ClientInterface::m_clients_mutex |
|
private |
Referenced by ~ClientInterface(), CreateClient(), DeleteClient(), event(), getClientIDs(), getClientNoEx(), getClientState(), getProtocolVersion(), markBlocksNotSent(), sendToAll(), setClientVersion(), setPlayerName(), step(), and UpdatePlayerList().
◆ m_clients_names
std::vector<std::string> ClientInterface::m_clients_names |
|
private |
◆ m_con
◆ m_env
◆ m_print_info_timer
float ClientInterface::m_print_info_timer = 0 |
|
private |
◆ statenames
const char * ClientInterface::statenames |
|
staticprivate |
Initial value:= {
"Invalid",
"Disconnecting",
"Denied",
"Created",
"HelloSent",
"AwaitingInit2",
"InitDone",
"DefinitionsSent",
"Active",
"SudoMode",
}
Referenced by state2Name().
The documentation for this class was generated from the following files: