Squeak Class Documentation category index | class index  
 
TelnetMachine
  category: Network-TelNet WordNet
  superclass: Model
  subclasses:

The beginnings of a telnet terminal, for telnetting to other hosts.


NOTE - it should separate out the VT100 code to a separate class some time....

instance methods
  IO
  connect
disconnect
processIO
release
step
wantsSteps

  access
  displayBuffer
displayBufferSelection
isConnected
port:
remoteHost:

  menu
  menu:shifted:
perform:orSendTo:
setHostName
setPort

  private
  do:
dont:
initialize
processDo:
processDont:
processInput:
processWill:
processWont:
sendChar:
will:
wont:

  screen management
  addBoringStringInNormalMode:
displayChar:
displayCharGatheringParameters:
displayCharSawEscape:
displayString:
possiblyWrapCursor
scrollScreenBack:

  sending data
  processTyping:
sendLine:

class methods
  initialization
  initialize

  instance creation
  new

  user interface
  open

instance methods
  IO top  
 

connect

connect to the name host


 

disconnect


 

processIO

should be called periodically--this actually sends and recieves some bytes over the network


 

release

Remove references to objects that may refer to the receiver. This message
should be overridden by subclasses with any cycles, in which case the
subclass should also include the expression super release.


 

step

Default for moephic models is no-op


 

wantsSteps

Overridden by morphic classes whose instances want to be stepped,
or by model classes who want their morphic views to be stepped.


  access top  
 

displayBuffer

the 'screen' of the terminal


 

displayBufferSelection

where the selection should be in the display buffer. It should be where the cursor is


 

isConnected

answer whether we are connected to a remote host


 

port:

set which port to connect to


 

remoteHost:

set which host to connect to


  menu top  
 

menu:shifted:


 

perform:orSendTo:

Selector was just chosen from a menu by a user. If can respond, then perform it on myself. If not, send it to otherTarget, presumably the editPane from which the menu was invoked.


 

setHostName


 

setPort


  private top  
 

do:

request that the remote side does optionNo


 

dont:

demand that the remote side doesn't do optionNo


 

initialize


 

processDo:

we don't do anything


 

processDont:

okay, fine by us, we won't do it...


 

processInput:

process input from the network


 

processWill:


 

processWont:


 

sendChar:

queue a character for sending over the network


 

will:

request that we do optionNo


 

wont:

demand that we won't do optionNo


  screen management top  
 

addBoringStringInNormalMode:

add a string with no special characters, and assuming we are already in #normal mode


 

displayChar:


 

displayCharGatheringParameters:

display a character from the mode #gatheringParameters


 

displayCharSawEscape:

display a character from the mode #sawEscape


 

displayString:

add aString to the display


 

possiblyWrapCursor

if the cursor has gone past the right margin, then wrap


 

scrollScreenBack:

scrolls the screen up by the number of lines. The cursor isn't moved


  sending data top  
 

processTyping:

process aString as if it were typed


 

sendLine:

send a line, along with a newline


class methods
  initialization top  
 

initialize

TelnetMachine initialize


  instance creation top  
 

new

Answer a new instance of the receiver (which is a class) with no indexable variables. Fail if the class is indexable.


  user interface top  
 

open

TelnetMachine open