Package netscape.net
Class NetworkClient
java.lang.Object
netscape.net.NetworkClient
- Direct Known Subclasses:
TransferProtocolClient
This is the base class for network clients.
- Version:
- 1.21, 08/07/97
- Author:
- Jonathan Payne
-
Field Summary
FieldsModifier and TypeFieldDescriptionBuffered stream for reading replies from server.Stream for printing to the server.protected Socket
Socket for communicating with server. -
Constructor Summary
ConstructorsConstructorDescriptionNetworkClient
(String host, int port) Create connection with host host on port port -
Method Summary
Modifier and TypeMethodDescriptionvoid
Close an open connection to the server.protected Socket
Return a socket connected to the server, with any appropriate options pre-establishedvoid
openServer
(String server, int port) Open a connection to the server.boolean
Return server connection status
-
Field Details
-
serverSocket
Socket for communicating with server. -
serverOutput
Stream for printing to the server. -
serverInput
Buffered stream for reading replies from server.
-
-
Constructor Details
-
NetworkClient
Create connection with host host on port port- Throws:
IOException
-
NetworkClient
public NetworkClient()
-
-
Method Details
-
openServer
Open a connection to the server.- Throws:
IOException
UnknownHostException
-
doConnect
Return a socket connected to the server, with any appropriate options pre-established- Throws:
IOException
UnknownHostException
-
closeServer
Close an open connection to the server.- Throws:
IOException
-
serverIsOpen
public boolean serverIsOpen()Return server connection status
-