My Project
ConsoleSession.h
1
#ifndef __ConsoleSession_h__
2
#define __ConsoleSession_h__
3
4
#include "TerminalSession.h"
5
#include "TCPSession.h"
6
#include "CommandList.h"
7
8
namespace
core
{
9
17
18
class
ConsoleSession
:
public
TerminalSession
{
19
20
public
:
21
ConsoleSession
(
EPoll
&ePoll,
TCPServer
&server);
22
~
ConsoleSession
();
23
24
void
writeLog(std::string data);
25
26
protected
:
27
void
protocol
(std::string data)
override
;
28
29
private
:
30
enum
Status {WELCOME, LOGIN, WAIT_USER_PROFILE, PASSWORD, WAIT_PASSWORD, PROMPT, INPUT, PROCESS, DONE};
31
Status status = WELCOME;
32
void
doCommand(std::string request);
33
std::string command;
34
35
};
36
37
}
38
39
#endif
core::EPoll
Definition:
EPoll.h:31
core
Definition:
Command.cpp:3
core::ConsoleSession
Definition:
ConsoleSession.h:18
core::TCPServer
Definition:
TCPServer.h:24
core::ConsoleSession::protocol
void protocol(std::string data) override
Definition:
ConsoleSession.cpp:12
core::TerminalSession
Definition:
TerminalSession.h:30
Generated by
1.8.13