* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
Program: TNCNX.PAS
Object: Delphi component which implement the TCP/IP telnet protocol
including some options negociations.
RFC854, RFC885, RFC779, RFC1091
Author: François PIETTE
EMail: francois.piette@ping.be http://www.rtfm.be/fpiette
francois.piette@f2202.n293.z2.fidonet.org
2:293/2202@fidonet.org, BBS +32-4-3651395
Support: Please ask your question in the following newsgroup:
news://forums.borland.com/borland.public.delphi.vcl.components.using
Creation: April, 1996
Version: 2.04
Legal issues: Copyright (C) 1997 by François PIETTE
This software is provided 'as-is', without any express or
implied warranty. In no event will the author be held liable
for any damages arising from the use of this software.
Permission is granted to anyone to use this software for any
purpose, including commercial applications, and to alter it
and redistribute it freely, subject to the following
restrictions:
1. The origin of this software must not be misrepresented,
you must not claim that you wrote the original software.
If you use this software in a product, an acknowledgment
in the product documentation would be appreciated but is
not required.
2. Altered source versions must be plainly marked as such, and
must not be misrepresented as being the original software.
3. This notice may not be removed or altered from any source
distribution.
Updates:
Jul 22, 1997 Adapted to Delphi 3
Sep 5, 1997 Added version information, removed old code, added OnTermType
Renamed some indentifier to be more standard.
Sep 24, 1997 V2.03 Added procedures to negociate options
May 12, 1998 V2.04 Changed NegociateOption to properly handle unwanted
option as Jan Tomasek suggested.
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * TTnCnx -
Register - Add or remove minus sign before dollar sign to } { generate code for debug message output } {* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
TTnDataAvailable
TTnDisplay
TTnSessionClosed
TTnSessionConnected
TNCH_AO
TNCH_AYT
TNCH_BREAK
TNCH_DATA_MARK
TNCH_DO
TNCH_DONT
TNCH_EC
TNCH_EL
TNCH_EOR
TNCH_GA
TNCH_IAC
TNCH_IP
TNCH_NOP
TNCH_SB
TNCH_SE
TNCH_WILL
TNCH_WONT
TnCnxVersion
TN_DET
TN_ECHO
TN_EOR
TN_EXOPL
TN_MSG_SZ_NEGOC
TN_NAWS
TN_NOPTIONS
TN_RECONNECTION
TN_SEND_LOC
TN_STATUS
TN_SUPPRESS_GA
TN_TERMSPEED
TN_TERMTYPE
TN_TFC
TN_TIMING_MARK
TN_TRANSMIT_BINARY
TN_TTYPE_IS
TN_TTYPE_SEND
TN_XDISPLOC
procedure Register;
Add or remove minus sign before dollar sign to } { generate code for debug message output } {* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
TTnDataAvailable = procedure (Sender: TTnCnx; Buffer : PChar; Len : Integer) of object
TTnDisplay = procedure (Sender: TTnCnx; Str : String) of object
TTnSessionClosed = procedure (Sender: TTnCnx; Error : word) of object
TTnSessionConnected = procedure (Sender: TTnCnx; Error : word) of object
TNCH_AO = #245
$F4 Interrupt process
TNCH_AYT = #246
$F5 Abort output
TNCH_BREAK = #243
$F2 Data stream portion of a Synch
TNCH_DATA_MARK = #242
$F1 No operation
TNCH_DO = #253
$FC Wont
TNCH_DONT = #254
$FD Do
TNCH_EC = #247
$F6 Are you there
TNCH_EL = #248
$F7 Erase character
TNCH_EOR = #239
Telnet command characters
TNCH_GA = #249
$F8 Erase line
TNCH_IAC = #255
$FE Dont
TNCH_IP = #244
$F3 NVT charcater break
TNCH_NOP = #241
$F0 End of subnegociation parameters
TNCH_SB = #250
$F9 Go ahead
TNCH_SE = #240
$EF End Of Record (preceded by IAC)
TNCH_WILL = #251
$FA Subnegociation
TNCH_WONT = #252
$FB Will
TnCnxVersion = 203
TN_DET = #20
$06
TN_ECHO = #1
$00
TN_EOR = #25
$18
TN_EXOPL = #255
$23
TN_MSG_SZ_NEGOC = #4
$03
TN_NAWS = #31
$19
TN_NOPTIONS = #6
$06
TN_RECONNECTION = #2
$01
TN_SEND_LOC = #23
$14
TN_STATUS = #5
$04
TN_SUPPRESS_GA = #3
$02
TN_TERMSPEED = #32
$1F
TN_TERMTYPE = #24
$17
TN_TFC = #33
$20
TN_TIMING_MARK = #6
$05
TN_TRANSMIT_BINARY = #0
$FF IAC } { Telnet options
TN_TTYPE_IS = #0
TN_TTYPE_SEND = #1
$FF
TN_XDISPLOC = #35
$21