-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathTelSocket.cpp
More file actions
86 lines (73 loc) · 1.62 KB
/
TelSocket.cpp
File metadata and controls
86 lines (73 loc) · 1.62 KB
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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
// CTelnetSocket.cpp : implementation file
//
#include "stdafx.h"
#include "TelSocket.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
/////////////////////////////////////////////////////////////////////////////
// CTelnetSocket
CTelnetSocket::CTelnetSocket()
{
}
CTelnetSocket::~CTelnetSocket()
{
}
void CTelnetSocket::OnReceive(int nErrorCode)
{
// TODO: Add your specialized code here and/or call the base class
/*
BYTE RecvBuffer[1024];
BYTE *RecvPtr = RecvBuffer;
INT BytesToHandle;
BytesToHandle = Receive(RecvPtr,sizeof(RecvBuffer));
if (m_NegociationInProgress) {
if (BytesToHandle) {
BytesHandled = HandleTelnet (RecvBuffer, BytesToHandle);
BytesToHandle -= BytesHandled;
}
}
if (BytesToHandle) {
if (BytesToHandle != m_quFifo.Put (pRecvBuffer, BytesToHandle)) {
ASSERT ();
}
if (IsQuadFull || IsTimeout) {
::PostMessage (WM_0);
}
}
*/
CSocket::OnReceive(nErrorCode);
}
void CTelnetSocket::OnClose(int nErrorCode)
{
// TODO: Add your specialized code here and/or call the base class
CSocket::OnClose(nErrorCode);
}
/*
void CTelnetSocket::YesReply(BYTE verb, BYTE option)
{
BYTE buf[3];
buf[0] = IAC;
buf[1] = (verb==DO)?WILL:(verb==DONT)?WONT:(verb==WILL)?DO:DONT;
buf[2] = option;
send (buf,3);
}
void CTelnetSocket::NoReply(BYTE verb,BYTE option)
{
BYTE buf[3];
buf[0] = IAC;
buf[1] = (verb==DO)?WONT:(verb==DONT)?WILL:(verb==WILL)?DONT:DO;
buf[2] = option;
send (buf,3);
}
void CTelnetSocket::AskFor(BYTE verb,BYTE option)
{
BYTE buf[3];
buf[0] = IAC;
buf[1] = verb;
buf[2] = option;
send (buf,3);
}
*/