|
Class: NVTClient
Object
|
+--NVTClient
|
+--FTPClient
|
+--SMTPClient
- Package:
- stx:goodies/communication
- Category:
- Net-Communication-Support
- Version:
- rev:
1.23
date: 2017/02/10 10:24:55
- user: cg
- file: NVTClient.st directory: goodies/communication
- module: stx stc-classLibrary: communication
- Author:
- Claus Gittinger
Abstract superclass for Network Virtual Terminal protocol clients;
i.e. FTPCLient, SMTPClient, TelnetClient etc..
FTPClient
appropriate
RFC's
Signal constants
-
commandErrorSignal
-
return the parent of all errors related to command execution
-
connectFailedSignal
-
return the parent of all errors related to connection setup
-
loginFailedSignal
-
return the signal raised if the login fails
-
netErrorSignal
-
return the parent of all net errors
-
timeoutErrorSignal
-
return the signal raised on response timeout
-
transmissionErrorSignal
-
return the parent signal related to all data transmission errors
-
unimplementedOperationErrorSignal
-
return the signal raised if some command is not implemented by
the partner (should not happen)
class initialization
-
initialize
-
Verbose := true.
usage example(s):
self initialize.
Verbose := true.
|
debugging
-
verbose: aBoolean
-
self verbose:false.
self verbose:true.
instance creation
-
connectTo: host
-
open a connection to some host as anonymous user
-
new
-
return a new ftpClient instance
-
openOnHostNamed: host
-
open a connection to some host; do not login
queries
-
isAbstract
-
Return if this class is an abstract class.
True is returned here for myself only; false for subclasses.
Abstract subclasses must redefine this again.
accessing
-
password
-
-
password: something
-
-
userName: aString
-
connection setup
-
connectTo: host
-
connect to some user as anonymous user
-
connectTo: host port: portNrOrNil user: user password: pw
-
connect to some host as some user
-
connectTo: host user: user
-
connect to some host as user
-
connectTo: host user: user password: pw
-
connect to some host as user
-
connectToHost: host
-
open a connection; do not login: - VW compatibility
-
connectionTimeout: millis
-
set timeout for establishing a connection. If the millis arg is nonNil, stop trying to
connect after that many milliseconds and raises an exception
-
useIPv4Only
-
-
useIPv6Only
-
defaults
-
defaultPassword
-
-
defaultPort
-
-
defaultUser
-
error handling
-
commandFailed
-
-
connectionFailed
-
-
errorStringFromResponse
-
-
loginFailed
-
-
responseTimeoutError
-
-
unimplementedOperationError
-
initialization
-
initialize
-
private - commands & responses
-
clearReplyPending
-
-
getResponse
-
wait for and read a response.
Leaves result in lastResponse (ascii) and lastReplyCode (numeric).
MultiLine responses are collected in responseLines.
Finally, handleReplyCode (redefinable) is asked to xlate from response code to
exception (if any)
-
getResponseHandlingReplyCodesWith: handleReplyCodeBlock
-
wait for and read a response.
Leaves result in lastResponse (ascii) and lastReplyCode (numeric).
MultiLine responses are collected in responseLines.
Finally, handleReplyCode (redefinable) is asked to xlate from response code to
exception (if any)
-
handleReplyCode: replyCode
-
intermediate message; final reply code follows
-
sendCommand: aCommandString
-
send a command, wait for response.
Leaves result in lastResponse (ascii) and lastReplyCode (numeric)
-
sendCommandNoWait: aCommandString
-
send a command, do not wait for response.
-
sendLine: aLine
-
send a line with CRLF
private - connection setup
-
close
-
disconnect - if redefined (to send a BYE message), do not forget to
invoke me here as well
-
connection
-
-
doConnect
-
connect, using the previously defined userName, password and hostName
-
getInitialConnectResponse
-
invoked right after the socket connection has been setup;
subclass implementation should read all initial hello-bla
** This method raises an error - it must be redefined in concrete classes **
-
performLoginSequence
-
invoked after the socket connection has been setup and the initial
connect response blah has been read.
A subclass implementation should perform whatever login sequence has to be performed.
** This method raises an error - it must be redefined in concrete classes **
-
sendGoodByeCommand
-
invoked before the socket connection is shutDown.
A subclass implementation may want to redefine this for a graceful goodBy
(typically sending a quit-command)
queries
-
isConnected
-
|