Class TransferProtocolClient
java.lang.Object
netscape.net.NetworkClient
netscape.net.TransferProtocolClient
- Direct Known Subclasses:
SmtpClient
This class implements that basic intefaces of transfer protocols.
It is used by subclasses implementing specific protocols.
- Version:
- 1.25, 08/07/97
- Author:
- Jonathan Payne
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected intcode for last replyArray of strings (usually 1 entry) for the last reply from the server.Fields inherited from class NetworkClient
serverInput, serverOutput, serverSocketModifier and TypeFieldDescriptionBuffered stream for reading replies from server.Stream for printing to the server.protected SocketSocket for communicating with server. -
Constructor Summary
ConstructorsConstructorDescriptioncreates an uninitialized instance of this class.TransferProtocolClient(String host, int port) standard constructor to host host, port port. -
Method Summary
Modifier and TypeMethodDescriptionconverts the server response into a string.Returns all server response strings.intPulls the response from the server and returns the code as a number.voidsendServer(String cmd) Sends command cmd to the server.Methods inherited from class NetworkClient
closeServer, doConnect, openServer, serverIsOpenModifier and TypeMethodDescriptionvoidClose an open connection to the server.protected SocketReturn a socket connected to the server, with any appropriate options pre-establishedvoidopenServer(String server, int port) Open a connection to the server.booleanReturn server connection status
-
Field Details
-
serverResponse
-
lastReplyCode
protected int lastReplyCodecode for last reply
-
-
Constructor Details
-
TransferProtocolClient
standard constructor to host host, port port.- Throws:
IOException
-
TransferProtocolClient
public TransferProtocolClient()creates an uninitialized instance of this class.
-
-
Method Details
-
readServerResponse
Pulls the response from the server and returns the code as a number. Returns -1 on failure.- Throws:
IOException
-
sendServer
Sends command cmd to the server. -
getResponseString
converts the server response into a string. -
getResponseStrings
-