Luanti 5.16.0-dev
Loading...
Searching...
No Matches
Server::ShutdownState Struct Reference
Collaboration diagram for Server::ShutdownState:

Public Member Functions

void reset ()
void trigger (float delay, const std::string &msg, bool reconnect)
void tick (float dtime, Server *server)
std::wstring getShutdownTimerMessage () const
bool isTimerRunning () const

Public Attributes

bool is_requested = false
bool should_reconnect = false
std::string message

Private Attributes

float m_timer = 0.0f

Friends

class TestServerShutdownState

Member Function Documentation

◆ getShutdownTimerMessage()

std::wstring Server::ShutdownState::getShutdownTimerMessage ( ) const

References duration_to_string(), m_timer, and myround().

Referenced by tick().

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

◆ isTimerRunning()

bool Server::ShutdownState::isTimerRunning ( ) const
inline

References m_timer.

◆ reset()

void Server::ShutdownState::reset ( )

References is_requested, m_timer, message, and should_reconnect.

Referenced by TestServerShutdownState::testReset().

Here is the caller graph for this function:

◆ tick()

void Server::ShutdownState::tick ( float dtime,
Server * server )

References Server::Server(), ARRLEN, getShutdownTimerMessage(), infostream, is_requested, m_timer, PEER_ID_INEXISTENT, and wide_to_utf8().

Referenced by TestServerShutdownState::testTick().

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

◆ trigger()

void Server::ShutdownState::trigger ( float delay,
const std::string & msg,
bool reconnect )

References m_timer, message, and should_reconnect.

Referenced by TestServerShutdownState::testTick(), and TestServerShutdownState::testTrigger().

Here is the caller graph for this function:

◆ TestServerShutdownState

friend class TestServerShutdownState
friend

Member Data Documentation

◆ is_requested

◆ m_timer

◆ message

◆ should_reconnect


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