# BMA Server Framework: /home/barant/Development/BMA/server_core/ServerCore/ConsoleSession.h Source File

/home/barant/Development/BMA/server_core/ServerCore/ConsoleSession.h
#ifndef __ConsoleSession_h__
#define __ConsoleSession_h__
#include "TerminalSession.h"
#include "Session.h"
#include "ConsoleServer.h"
#include "CommandList.h"
namespace core {
class ConsoleSession : public TerminalSession {
public:
ConsoleSession(EPoll &ePoll, ConsoleServer &server);
~ConsoleSession();
virtual void output(std::stringstream &out);
void writeLog(std::string data);
protected:
void protocol(std::string data) override;
private:
enum Status {WELCOME, LOGIN, WAIT_USER_PROFILE, PASSWORD, WAIT_PASSWORD, PROMPT, INPUT, PROCESS, DONE};
Status status = WELCOME;
void doCommand(std::string request);
std::string command;
};
}
#endif
core::EPoll
Definition: EPoll.h:31
core
Definition: Command.cpp:4
core::ConsoleSession
Definition: ConsoleSession.h:19
core::ConsoleSession::output
virtual void output(std::stringstream &out)
Definition: ConsoleSession.cpp:11
core::ConsoleServer
Definition: ConsoleServer.h:18
core::TerminalSession
Definition: TerminalSession.h:29