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