1 #pragma once 2 3 //#include "tparser.h" 4 //#include "tnetwork.h" 5 6 DWORD WINAPI telProcessNetwork(LPVOID lpParameter); 7 8 class TTelnetHandler { 9 private: 10 int iTermSet; 11 int bInBinaryRx, bInBinaryTx; 12 int bInEchoTx, bInEchoRx; 13 int iWillSGA; 14 15 void init(); 16 17 int escapeIAC(char *buf, int length); 18 19 // Paul Brannan 5/15/98 20 void SendIAC(char c); 21 void SendIAC(char c1, char c2); 22 void SendIACParams(char c); 23 void SendIACParams(char c1, char c2); 24 void print_telopt(const char *s, int d); 25 26 TNetwork &Network; 27 TConsole &Console; 28 TParser &Parser; 29 30 char* ParseBuffer(char* pszBuffer, char* pszBufferEnd); 31 char* ParseIAC(char* pszBuffer, char* pszBufferEnd); 32 33 // Paul Brannan 9/13/98 34 char *szBuffer, *tmpBuffer; 35 char *ansiBufferStart, *ansiBufferEnd; 36 int dwBuffer; 37 38 void do_naws(int width, int height); 39 40 public: 41 TTelnetHandler(TNetwork &RefNetwork, TConsole &RefConsole, 42 TParser &RefParser); 43 ~TTelnetHandler(); 44 45 DWORD Go(LPVOID pvParams); 46 47 int get_term() {return iTermSet;} 48 }; 49