19 #ifndef __RASESSION_H__
20 #define __RASESSION_H__
23 #include <boost/asio/ip/tcp.hpp>
24 #include <boost/asio/streambuf.hpp>
29 using boost::asio::ip::tcp;
33 class RASession :
public std::enable_shared_from_this <RASession>
46 int Send(
const char* data);
49 bool CheckPassword(
const std::string& user,
const std::string& pass);
52 static void CommandPrint(
void* callbackArg,
const char* text);
int Send(const char *data)
Definition: RASession.cpp:93
static void CommandPrint(void *callbackArg, const char *text)
Definition: RASession.cpp:207
const size_t bufferSize
Definition: RASession.h:31
const std::string GetRemoteIpAddress() const
Definition: RASession.h:42
void Start()
Definition: RASession.cpp:32
unsigned short GetRemotePort() const
Definition: RASession.h:43
bool CheckPassword(const std::string &user, const std::string &pass)
Definition: RASession.cpp:154
Definition: RASession.h:33
bool ProcessCommand(std::string &command)
Definition: RASession.cpp:180
RASession(tcp::socket &&socket)
Definition: RASession.h:36
bool CheckAccessLevel(const std::string &user)
Definition: RASession.cpp:122
boost::asio::streambuf _readBuffer
Definition: RASession.h:56
std::string ReadString()
Definition: RASession.cpp:102
tcp::socket _socket
Definition: RASession.h:55
std::promise< void > * _commandExecuting
Definition: RASession.h:58
boost::asio::streambuf _writeBuffer
Definition: RASession.h:57
static void CommandFinished(void *callbackArg, bool)
Definition: RASession.cpp:216