18#ifndef TRINITYCORE_RA_SESSION_H
19#define TRINITYCORE_RA_SESSION_H
23#include <boost/asio/ip/tcp.hpp>
24#include <boost/asio/streambuf.hpp>
29using boost::asio::ip::tcp;
33class RASession :
public std::enable_shared_from_this <RASession>
46 int Send(std::string_view data);
49 bool CheckPassword(
const std::string& user,
const std::string& pass);
52 static void CommandPrint(
void* callbackArg, std::string_view text);
int Send(std::string_view data)
static void CommandFinished(void *callbackArg, bool)
bool CheckAccessLevel(const std::string &user)
std::promise< void > * _commandExecuting
boost::asio::streambuf _writeBuffer
unsigned short GetRemotePort() const
boost::asio::streambuf _readBuffer
Trinity::Net::IoContextTcpSocket _socket
bool CheckPassword(const std::string &user, const std::string &pass)
bool ProcessCommand(std::string &command)
RASession(Trinity::Net::IoContextTcpSocket &&socket)
static void CommandPrint(void *callbackArg, std::string_view text)
const std::string GetRemoteIpAddress() const
boost::asio::basic_stream_socket< boost::asio::ip::tcp, boost::asio::io_context::executor_type > IoContextTcpSocket