|
Class: ProtocolClient
Object
|
+--ProtocolClient
- Package:
- stx:libcompat
- Category:
- Compatibility-Squeak
- Version:
- rev:
1.11
date: 2023/12/12 21:50:01
- user: cg
- file: ProtocolClient.st directory: libcompat
- module: stx stc-classLibrary: libcompat
This is a dummy compatibility class, to provide a home for loaded Squeak classes
which inherit from this. It is not used in ST/X.
ProtocolClient is the abstract super class for a variety of network protocol clients.
It uses a stream rather than the direct network access so it could also work for streams on serial connections etc.
Structure:
stream stream representing the connection to and from the server
connectInfo information required for opening a connection
lastResponse remembers the last response from the server.
progressObservers any object understanding #show: can be registered as a progress observer (login, transfer, etc)
accessing
-
defaultPortNumber
-
** This method must be redefined in concrete classes (subclassResponsibility) **
-
logFlag
-
** This method must be redefined in concrete classes (subclassResponsibility) **
instance creation
-
openOnHost: hostIP port: portNumber
-
-
openOnHostNamed: hostName
-
If the hostname uses the colon syntax to express a certain portnumber
we use that instead of the default port number.
-
openOnHostNamed: hostName port: portNumber
-
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
-
logProgressToTranscript
-
-
messageText
-
-
response
-
-
stream
-
-
stream: aStream
-
actions
-
close
-
-
reopen
-
private
-
connectionInfo
-
-
defaultPortNumber
-
-
ensureConnection
-
-
host
-
-
host: hostId
-
-
lastResponse
-
-
lastResponse: aString
-
-
logFlag
-
-
logProgress: aString
-
-
openOnHost: hostIP port: portNumber
-
-
password
-
-
password: aString
-
-
pendingResponses
-
-
popResponse
-
-
port
-
-
port: aPortNumber
-
-
progressObservers
-
-
pushResponse: aResponse
-
-
resetConnectionInfo
-
-
user
-
-
user: aString
-
private protocol
-
checkForPendingError
-
If data is waiting, check it to catch any error reports.
In case the response is not an error, push it back.
-
checkResponse
-
-
checkResponse: aResponse onError: errorBlock onWarning: warningBlock
-
Get the response from the server and check for errors.
Invoke one of the blocks if an error or warning is encountered.
See class comment for classification of error codes.
-
checkResponseOnError: errorBlock onWarning: warningBlock
-
Get the response from the server and check for errors.
Invoke one of the blocks if an error or warning is encountered.
See class comment for classification of error codes.
-
fetchNextResponse
-
-
fetchPendingResponse
-
-
sendCommand: aString
-
-
sendStreamContents: aStream
-
private testing
-
responseIsError
-
** This method must be redefined in concrete classes (subclassResponsibility) **
-
responseIsWarning
-
** This method must be redefined in concrete classes (subclassResponsibility) **
testing
-
isConnected
-
|