/home/barant/Development/BMA/server_core/ServerCore/BMAConsoleSession.h
#ifndef __BMAConsoleSession_h__
#define __BMAConsoleSession_h__
#include "BMATerminal.h"
#include "BMASession.h"
#include "BMAConsoleServer.h"
class BMAConsoleSession : public BMATerminal {
public:
BMAConsoleSession(BMAEPoll &ePoll, BMAConsoleServer &server);
~BMAConsoleSession();
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
BMAEPoll
Definition: BMAEPoll.h:29
BMAConsoleServer
Definition: BMAConsoleServer.h:9
BMATerminal
Definition: BMATerminal.h:27
BMAConsoleSession::output
virtual void output(std::stringstream &out)
Definition: BMAConsoleSession.cpp:9
BMAConsoleSession
Definition: BMAConsoleSession.h:16