eXept Software AG Logo

Smalltalk/X Webserver

Documentation of class 'TelnetClient':

Home

everywhere
www.exept.de
for:
[back]

Class: TelnetClient


Inheritance:

   Object
   |
   +--TelnetClient

Package:
stx:goodies/communication
Category:
Net-Communication-Telnet
Version:
rev: 1.29 date: 2009/06/25 15:33:45
user: mb
file: TelnetClient.st directory: goodies/communication
module: stx stc-classLibrary: communication
Author:
Claus Gittinger (cg@exept.de)

Description:


Implements the telnet client protocol.
Provides limited writeStream protocol, allowing
data to be sent to the partner via #nextPut: like protocol.
Input arriving from the telnet partner is forwarded to my
outputStream.
A concrete application is found in TelNetTool, which connects me
to a TerminalView.




[instance variables:]
    connection      <Socket>        the telnet connection

    outputStream    <Stream>        data arriving from the
                                    telnet connection is forwarded
                                    to that stream.

    state           <Symbol>        the telnet protocol state.

    sb, sbData                      internal buffer for
                                    SB..SE data


Related information:

    TelnetTool
    TerminalView

Class protocol:

debugging
o  verbose

o  verbose: aBoolean

initialization
o  initialize

instance creation
o  new


Instance protocol:

accessing
o  connectionBrokenAction: aBlock
set the action which is evaluated when the connection is broken

o  disconnect
Transcript showCR:'*** disconnect'.

o  newConnection: aSocket

o  outputStream
return the value of the instance variable 'outputStream' (automatically generated)

o  outputStream: something
set the value of the instance variable 'outputStream' (automatically generated)

o  terminalType: something
what we tell the partner, what the terminal looks like.
If never set, it defaults to either 'dump' or 'vt100', depending on the outStream

initialization
o  initialize

queries
o  isConnected

stream protocol
o  nextPut: aCharacter
send that character to my telnet partner

o  nextPutAll: aString
send some characters to my telnet partner

o  nextPutByte: aByte
send that character to my telnet partner

o  nextPutLine: aString

o  sendDO: option

o  sendDONT: option

o  sendSB: option

o  sendSE

o  sendWILL: option

o  sendWONT: option

telnet protocol
o  startReaderProcess

o  stopReaderProcess

telnet protocol - state machine
o  handleSB: sb data: sbData

o  handleSB_TELOPT_TTYPE: sbData

o  stateDATA: inByte

o  stateDO: inByte
please do option

o  stateDONT: inByte
please do not option

o  stateIAC: inByte

o  stateSB: inByte
sub

o  stateSBDATA: inByte
sub-data

o  stateSBDATAIAC: inByte
sub-data

o  stateSBIAC: inByte
sub-iac

o  stateWILL: inByte
please do option

o  stateWONT: inByte
please dont option


Demonstration:


    TelnetTool open



ST/X 6.1.1; WebServer 1.620 at exept:8081; Tue, 22 May 2012 22:38:03 GMT