Leviathan  0.8.0.0
Leviathan game engine
Leviathan::RemoteConsoleSession Class Reference

#include <RemoteConsole.h>

Public Member Functions

DLLEXPORT RemoteConsoleSession (const std::string &name, std::shared_ptr< Connection > connection, int32_t token)
 
DLLEXPORT ~RemoteConsoleSession ()
 
DLLEXPORT ConnectionGetConnection ()
 
DLLEXPORT void KillConnection ()
 Sets the connection as closing. More...
 

Detailed Description

Definition at line 14 of file RemoteConsole.h.

Constructor & Destructor Documentation

◆ RemoteConsoleSession()

DLLEXPORT Leviathan::RemoteConsoleSession::RemoteConsoleSession ( const std::string &  name,
std::shared_ptr< Connection connection,
int32_t  token 
)
inline

Definition at line 17 of file RemoteConsole.h.

18  :
19  ConnectionName(name), SessionToken(token), CorrespondingConnection(connection),
20  IsOpened(true), TerminateSession(false)
21  { }

◆ ~RemoteConsoleSession()

Leviathan::RemoteConsoleSession::~RemoteConsoleSession ( )

Definition at line 242 of file RemoteConsole.cpp.

243 {
244  // Send close request //
245  if(CorrespondingConnection->IsValidForSend()) {
246 
247  CorrespondingConnection->SendPacketToConnection(
248  std::make_shared<RequestNone>(NETWORK_REQUEST_TYPE::CloseRemoteConsole),
250  }
251 }

Member Function Documentation

◆ GetConnection()

DLLEXPORT Connection * Leviathan::RemoteConsoleSession::GetConnection ( )

Definition at line 253 of file RemoteConsole.cpp.

254 {
255  return CorrespondingConnection.get();
256 }

◆ KillConnection()

DLLEXPORT void Leviathan::RemoteConsoleSession::KillConnection ( )

Sets the connection as closing.

Definition at line 258 of file RemoteConsole.cpp.

259 {
260  TerminateSession = true;
261 }

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