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 249 of file RemoteConsole.cpp.

249  {
250  // Send close request //
251  if(CorrespondingConnection->IsValidForSend()){
252 
253  CorrespondingConnection->SendPacketToConnection(std::make_shared<RequestNone>(
256  }
257 }

Member Function Documentation

◆ GetConnection()

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

Definition at line 259 of file RemoteConsole.cpp.

259  {
260  return CorrespondingConnection.get();
261 }

◆ KillConnection()

DLLEXPORT void Leviathan::RemoteConsoleSession::KillConnection ( )

Sets the connection as closing.

Definition at line 263 of file RemoteConsole.cpp.

263  {
264  TerminateSession = true;
265 }

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