Project SkyFire Core
SkyFire 5.4.8 server core API documentation
Loading...
Searching...
No Matches
WorldSocketSessionState Class Reference

#include <WorldSocketSessionState.h>

Collaboration diagram for WorldSocketSessionState:

Public Member Functions

bool Attach (WorldSession *session)
bool Detach (WorldSession *session)
bool HasSession () const
template<class Callback>
auto WithSession (Callback &&callback) const -> decltype(callback(static_cast< WorldSession * >(nullptr)))
 WorldSocketSessionState ()

Private Types

typedef std::lock_guard< LockTypeGuardType
typedef Skyfire::Mutex LockType

Private Attributes

LockType _lock
WorldSession_session

Detailed Description

Definition at line 15 of file WorldSocketSessionState.h.

Member Typedef Documentation

◆ GuardType

typedef std::lock_guard<LockType> WorldSocketSessionState::GuardType
private

Definition at line 61 of file WorldSocketSessionState.h.

◆ LockType

Constructor & Destructor Documentation

◆ WorldSocketSessionState()

WorldSocketSessionState::WorldSocketSessionState ( )
inline

Definition at line 18 of file WorldSocketSessionState.h.

References _session.

Member Function Documentation

◆ Attach()

bool WorldSocketSessionState::Attach ( WorldSession * session)
inline

Definition at line 20 of file WorldSocketSessionState.h.

References _lock, and _session.

◆ Detach()

bool WorldSocketSessionState::Detach ( WorldSession * session)
inline

Definition at line 33 of file WorldSocketSessionState.h.

References _lock, and _session.

◆ HasSession()

bool WorldSocketSessionState::HasSession ( ) const
inline

Definition at line 46 of file WorldSocketSessionState.h.

References _lock, and _session.

◆ WithSession()

template<class Callback>
auto WorldSocketSessionState::WithSession ( Callback && callback) const -> decltype(callback(static_cast< WorldSession * >(nullptr)))
inline

Definition at line 53 of file WorldSocketSessionState.h.

References _lock, and _session.

Member Data Documentation

◆ _lock

LockType WorldSocketSessionState::_lock
mutableprivate

Definition at line 63 of file WorldSocketSessionState.h.

Referenced by Attach(), Detach(), HasSession(), and WithSession().

◆ _session

WorldSession* WorldSocketSessionState::_session
private

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