forked from martydill/telnet
-
Notifications
You must be signed in to change notification settings - Fork 0
/
TelnetSession.h
45 lines (31 loc) · 900 Bytes
/
TelnetSession.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
// TelnetSession.h
// Definitions for the TelnetSession class
#ifndef TELNETSESSION_H
#define TELNETSESSION_H
#include "Connection.h"
#include "SendBuf.h"
#include "Console.h"
#include <iostream>
#include <fstream>
class TelnetSession
{
public:
TelnetSession();
~TelnetSession();
void openConnection(char* address, int port);
void mainLoop(void);
int handleCommand(unsigned char* commandData);
void respondToRequest(unsigned char command, unsigned char option);
void respondToStatement(unsigned char command, unsigned char option);
int handleVTCommand(unsigned char* commandData);
bool SendBuffer(SendBuf buffer);
void sendString(char* characterToSend);
void setConnectionState(bool state);
bool getConnectionState(void);
private:
Connection* connection;
bool activeConnection;
Console* console;
ofstream debugLog;
};
#endif