Minetest  5.4.0
RemoteClient Class Reference

#include <clientiface.h>

+ Collaboration diagram for RemoteClient:

Public Member Functions

bool isSudoMechAllowed (AuthMechanism mech)
 
bool isMechAllowed (AuthMechanism mech)
 
 RemoteClient ()
 
 ~RemoteClient ()=default
 
void GetNextBlocks (ServerEnvironment *env, EmergeManager *emerge, float dtime, std::vector< PrioritySortedBlockTransfer > &dest)
 
void GotBlock (v3s16 p)
 
void SentBlock (v3s16 p)
 
void SetBlockNotSent (v3s16 p)
 
void SetBlocksNotSent (std::map< v3s16, MapBlock * > &blocks)
 
void ResendBlockIfOnWire (v3s16 p)
 tell client about this block being modified right now. More...
 
u32 getSendingCount () const
 
bool isBlockSent (v3s16 p) const
 
void PrintInfo (std::ostream &o)
 
ClientState getState () const
 
std::string getName () const
 
void setName (const std::string &name)
 
void notifyEvent (ClientStateEvent event)
 
void setPendingSerializationVersion (u8 version)
 
void setDeployedCompressionMode (u16 byteFlag)
 
void confirmSerializationVersion ()
 
u64 uptime () const
 
void setVersionInfo (u8 major, u8 minor, u8 patch, const std::string &full)
 
u8 getMajor () const
 
u8 getMinor () const
 
u8 getPatch () const
 
const std::string & getFullVer () const
 
void setLangCode (const std::string &code)
 
const std::string & getLangCode () const
 
void setCachedAddress (const Address &addr)
 
const AddressgetAddress () const
 

Public Attributes

session_t peer_id = PEER_ID_INEXISTENT
 
u8 serialization_version = SER_FMT_VER_INVALID
 
u16 net_proto_version = 0
 
std::string enc_pwd = ""
 
bool create_player_on_auth_success = false
 
AuthMechanism chosen_mech = AUTH_MECHANISM_NONE
 
void * auth_data = nullptr
 
u32 allowed_auth_mechs = 0
 
u32 allowed_sudo_mechs = 0
 
float m_time_from_building = 9999
 
std::set< u16 > m_known_objects
 

Private Attributes

u8 m_pending_serialization_version = SER_FMT_VER_INVALID
 
ClientState m_state = CS_Created
 
Address m_addr
 
std::string m_lang_code
 
std::set< v3s16m_blocks_sent
 
s16 m_nearest_unsent_d = 0
 
v3s16 m_last_center
 
v3f m_last_camera_dir
 
const u16 m_max_simul_sends
 
const float m_min_time_from_building
 
const s16 m_max_send_distance
 
const s16 m_block_optimize_distance
 
const s16 m_max_gen_distance
 
const bool m_occ_cull
 
std::map< v3s16, float > m_blocks_sending
 
std::set< v3s16m_blocks_modified
 
u32 m_excess_gotblocks = 0
 
float m_nothing_to_send_pause_timer = 0.0f
 
std::string m_name = ""
 
u8 m_version_major = 0
 
u8 m_version_minor = 0
 
u8 m_version_patch = 0
 
std::string m_full_version = "unknown"
 
u16 m_deployed_compression = 0
 
const u64 m_connection_time = porting::getTimeS()
 

Constructor & Destructor Documentation

◆ RemoteClient()

RemoteClient::RemoteClient ( )

◆ ~RemoteClient()

RemoteClient::~RemoteClient ( )
default

Member Function Documentation

◆ confirmSerializationVersion()

void RemoteClient::confirmSerializationVersion ( )
inline

References m_pending_serialization_version, and serialization_version.

Referenced by notifyEvent().

+ Here is the caller graph for this function:

◆ getAddress()

const Address& RemoteClient::getAddress ( ) const
inline

References m_addr.

Referenced by Server::getPeerAddress().

+ Here is the caller graph for this function:

◆ getFullVer()

const std::string& RemoteClient::getFullVer ( ) const
inline

References m_full_version.

◆ getLangCode()

const std::string& RemoteClient::getLangCode ( ) const
inline

References m_lang_code.

◆ getMajor()

u8 RemoteClient::getMajor ( ) const
inline

References m_version_major.

◆ getMinor()

u8 RemoteClient::getMinor ( ) const
inline

References m_version_minor.

◆ getName()

std::string RemoteClient::getName ( ) const
inline

References m_name.

Referenced by Server::sendDetachedInventories().

+ Here is the caller graph for this function:

◆ GetNextBlocks()

◆ getPatch()

u8 RemoteClient::getPatch ( ) const
inline

References m_version_patch.

◆ getSendingCount()

u32 RemoteClient::getSendingCount ( ) const
inline

References m_blocks_sending.

◆ getState()

ClientState RemoteClient::getState ( ) const
inline

References m_state.

◆ GotBlock()

void RemoteClient::GotBlock ( v3s16  p)

References m_blocks_sending, m_blocks_sent, m_excess_gotblocks, and p().

+ Here is the call graph for this function:

◆ isBlockSent()

bool RemoteClient::isBlockSent ( v3s16  p) const
inline

References m_blocks_sent, and p().

+ Here is the call graph for this function:

◆ isMechAllowed()

bool RemoteClient::isMechAllowed ( AuthMechanism  mech)
inline

References allowed_auth_mechs.

◆ isSudoMechAllowed()

bool RemoteClient::isSudoMechAllowed ( AuthMechanism  mech)
inline

References allowed_sudo_mechs.

◆ notifyEvent()

◆ PrintInfo()

void RemoteClient::PrintInfo ( std::ostream &  o)
inline

◆ ResendBlockIfOnWire()

void RemoteClient::ResendBlockIfOnWire ( v3s16  p)

tell client about this block being modified right now.

this information is required to requeue the block in case it's "on wire" while modification is processed by server

Parameters
pposition of modified block

References m_blocks_sending, p(), and SetBlockNotSent().

+ Here is the call graph for this function:

◆ SentBlock()

void RemoteClient::SentBlock ( v3s16  p)

References infostream, m_blocks_sending, and p().

+ Here is the call graph for this function:

◆ SetBlockNotSent()

void RemoteClient::SetBlockNotSent ( v3s16  p)

References m_blocks_modified, m_blocks_sending, m_blocks_sent, m_nothing_to_send_pause_timer, and p().

Referenced by ResendBlockIfOnWire().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ SetBlocksNotSent()

void RemoteClient::SetBlocksNotSent ( std::map< v3s16, MapBlock * > &  blocks)

References m_blocks_modified, m_blocks_sending, m_blocks_sent, m_nothing_to_send_pause_timer, and p().

+ Here is the call graph for this function:

◆ setCachedAddress()

void RemoteClient::setCachedAddress ( const Address addr)
inline

References m_addr.

◆ setDeployedCompressionMode()

void RemoteClient::setDeployedCompressionMode ( u16  byteFlag)
inline

◆ setLangCode()

void RemoteClient::setLangCode ( const std::string &  code)
inline

References m_lang_code.

◆ setName()

void RemoteClient::setName ( const std::string &  name)
inline

References m_name.

◆ setPendingSerializationVersion()

void RemoteClient::setPendingSerializationVersion ( u8  version)
inline

◆ setVersionInfo()

void RemoteClient::setVersionInfo ( u8  major,
u8  minor,
u8  patch,
const std::string &  full 
)
inline

◆ uptime()

u64 RemoteClient::uptime ( ) const

References porting::getTimeS(), and m_connection_time.

+ Here is the call graph for this function:

Member Data Documentation

◆ allowed_auth_mechs

u32 RemoteClient::allowed_auth_mechs = 0

Referenced by isMechAllowed().

◆ allowed_sudo_mechs

u32 RemoteClient::allowed_sudo_mechs = 0

Referenced by isSudoMechAllowed().

◆ auth_data

void* RemoteClient::auth_data = nullptr

Referenced by notifyEvent().

◆ chosen_mech

AuthMechanism RemoteClient::chosen_mech = AUTH_MECHANISM_NONE

Referenced by notifyEvent().

◆ create_player_on_auth_success

bool RemoteClient::create_player_on_auth_success = false

◆ enc_pwd

std::string RemoteClient::enc_pwd = ""

◆ m_addr

Address RemoteClient::m_addr
private

Referenced by getAddress(), and setCachedAddress().

◆ m_block_optimize_distance

const s16 RemoteClient::m_block_optimize_distance
private

Referenced by GetNextBlocks().

◆ m_blocks_modified

std::set<v3s16> RemoteClient::m_blocks_modified
private

◆ m_blocks_sending

std::map<v3s16, float> RemoteClient::m_blocks_sending
private

◆ m_blocks_sent

std::set<v3s16> RemoteClient::m_blocks_sent
private

◆ m_connection_time

const u64 RemoteClient::m_connection_time = porting::getTimeS()
private

Referenced by uptime().

◆ m_deployed_compression

u16 RemoteClient::m_deployed_compression = 0
private

◆ m_excess_gotblocks

u32 RemoteClient::m_excess_gotblocks = 0
private

Referenced by GotBlock(), and PrintInfo().

◆ m_full_version

std::string RemoteClient::m_full_version = "unknown"
private

Referenced by getFullVer(), and setVersionInfo().

◆ m_known_objects

std::set<u16> RemoteClient::m_known_objects

◆ m_lang_code

std::string RemoteClient::m_lang_code
private

Referenced by getLangCode(), and setLangCode().

◆ m_last_camera_dir

v3f RemoteClient::m_last_camera_dir
private

Referenced by GetNextBlocks().

◆ m_last_center

v3s16 RemoteClient::m_last_center
private

Referenced by GetNextBlocks().

◆ m_max_gen_distance

const s16 RemoteClient::m_max_gen_distance
private

Referenced by GetNextBlocks().

◆ m_max_send_distance

const s16 RemoteClient::m_max_send_distance
private

Referenced by GetNextBlocks().

◆ m_max_simul_sends

const u16 RemoteClient::m_max_simul_sends
private

Referenced by GetNextBlocks().

◆ m_min_time_from_building

const float RemoteClient::m_min_time_from_building
private

Referenced by GetNextBlocks().

◆ m_name

std::string RemoteClient::m_name = ""
private

Referenced by getName(), and setName().

◆ m_nearest_unsent_d

s16 RemoteClient::m_nearest_unsent_d = 0
private

Referenced by GetNextBlocks(), and PrintInfo().

◆ m_nothing_to_send_pause_timer

float RemoteClient::m_nothing_to_send_pause_timer = 0.0f
private

◆ m_occ_cull

const bool RemoteClient::m_occ_cull
private

Referenced by GetNextBlocks().

◆ m_pending_serialization_version

u8 RemoteClient::m_pending_serialization_version = SER_FMT_VER_INVALID
private

◆ m_state

ClientState RemoteClient::m_state = CS_Created
private

Referenced by getState(), and notifyEvent().

◆ m_time_from_building

float RemoteClient::m_time_from_building = 9999

◆ m_version_major

u8 RemoteClient::m_version_major = 0
private

Referenced by getMajor(), and setVersionInfo().

◆ m_version_minor

u8 RemoteClient::m_version_minor = 0
private

Referenced by getMinor(), and setVersionInfo().

◆ m_version_patch

u8 RemoteClient::m_version_patch = 0
private

Referenced by getPatch(), and setVersionInfo().

◆ net_proto_version

u16 RemoteClient::net_proto_version = 0

◆ peer_id

session_t RemoteClient::peer_id = PEER_ID_INEXISTENT

Referenced by GetNextBlocks(), and PrintInfo().

◆ serialization_version

u8 RemoteClient::serialization_version = SER_FMT_VER_INVALID

The documentation for this class was generated from the following files: