#include <clientiface.h>
|
| ClientInterface (const std::shared_ptr< con::Connection > &con) |
|
| ~ClientInterface () |
|
void | step (float dtime) |
|
std::vector< session_t > | getClientIDs (ClientState min_state=CS_Active) |
|
void | markBlockposAsNotSent (const v3s16 &pos) |
|
bool | isUserLimitReached () |
| Verify if user limit was reached. More...
|
|
const std::vector< std::string > & | getPlayerNames () const |
|
void | send (session_t peer_id, u8 channelnum, NetworkPacket *pkt, bool reliable) |
|
void | sendToAll (NetworkPacket *pkt) |
|
void | sendToAllCompat (NetworkPacket *pkt, NetworkPacket *legacypkt, u16 min_proto_ver) |
|
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::Connection > & |
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, m_clients, m_clients_mutex, and UpdatePlayerList().
Referenced by Server::acceptAuth(), Server::deletingPeer(), Server::DenyAccess(), Server::DenyAccess_Legacy(), Server::DenyAccessVerCompliant(), 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::getStatusString(), Server::handleChat(), Server::handleCommand_Init(), isUserLimitReached(), Server::playSound(), Server::reportPrivsModified(), Server::sendAddNode(), Server::SendAddParticleSpawner(), Server::SendBlocks(), Server::sendMetadataChanged(), Server::sendRemoveNode(), Server::SendSpawnParticle(), Server::SetBlocksNotSent(), 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 |
( |
| ) |
|
◆ lock()
void ClientInterface::lock |
( |
| ) |
|
|
inlineprotected |
References m_clients_mutex.
Referenced by Server::AsyncRunStep(), Server::dynamicAddMedia(), Server::getClientInfo(), Server::handleCommand_GotBlocks(), Server::sendAddNode(), Server::SendBlock(), Server::SendBlocks(), Server::sendMetadataChanged(), Server::sendRemoveNode(), Server::SetBlocksNotSent(), and Server::StageTwoClientInit().
◆ lockedGetClientNoEx()
◆ markBlockposAsNotSent()
void ClientInterface::markBlockposAsNotSent |
( |
const v3s16 & |
pos | ) |
|
◆ send()
◆ sendToAll()
References ClientCommandFactory::channel, clientCommandFactoryTable, NetworkPacket::getCommand(), m_clients, m_clients_mutex, m_con, and ClientCommandFactory::reliable.
Referenced by Server::DeleteClient(), Server::handleCommand_ClientReady(), Server::SendChatMessage(), Server::SendDeleteParticleSpawner(), Server::sendDetachedInventory(), and Server::SendTimeOfDay().
◆ sendToAllCompat()
◆ 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 | ) |
|
◆ unlock()
void ClientInterface::unlock |
( |
| ) |
|
|
inlineprotected |
References m_clients_mutex.
Referenced by Server::AsyncRunStep(), Server::dynamicAddMedia(), Server::getClientInfo(), Server::handleCommand_GotBlocks(), Server::sendAddNode(), Server::SendBlock(), Server::SendBlocks(), Server::sendMetadataChanged(), Server::sendRemoveNode(), Server::SetBlocksNotSent(), and Server::StageTwoClientInit().
◆ UpdatePlayerList()
void ClientInterface::UpdatePlayerList |
( |
| ) |
|
|
private |
◆ Server
◆ m_clients
Referenced by ~ClientInterface(), CreateClient(), DeleteClient(), event(), getClientIDs(), getClientList(), getClientNoEx(), getClientState(), getProtocolVersion(), lockedGetClientNoEx(), markBlockposAsNotSent(), sendToAll(), sendToAllCompat(), setClientVersion(), and setPlayerName().
◆ m_clients_mutex
std::recursive_mutex ClientInterface::m_clients_mutex |
|
private |
Referenced by ~ClientInterface(), CreateClient(), DeleteClient(), event(), getClientIDs(), getClientNoEx(), getClientState(), getProtocolVersion(), lock(), markBlockposAsNotSent(), sendToAll(), sendToAllCompat(), setClientVersion(), setPlayerName(), unlock(), 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 |
|
private |
◆ statenames
const char * ClientInterface::statenames |
|
staticprivate |
Initial value:= {
"Invalid",
"Disconnecting",
"Denied",
"Created",
"AwaitingInit2",
"HelloSent",
"InitDone",
"DefinitionsSent",
"Active",
"SudoMode",
}
Referenced by state2Name().
The documentation for this class was generated from the following files: