public final class EchoTCPClient extends DiscardTCPClient
connect and call getOutputStream() to retrieve the echo output
stream and getInputStream() to get the echo input stream. Don't close either stream when you're done using them. Rather, call
disconnect to clean up properly.EchoUDPClient,
DiscardTCPClient| Modifier and Type | Field and Description |
|---|---|
static int |
DEFAULT_PORT
The default echo port.
|
_defaultPort_, _hostname_, _input_, _output_, _serverSocketFactory_, _socket_, _socketFactory_, _timeout_, connectTimeout, NETASCII_EOL, remoteInetSocketAddress| Constructor and Description |
|---|
EchoTCPClient()
The default EchoTCPClient constructor.
|
| Modifier and Type | Method and Description |
|---|---|
InputStream |
getInputStream()
Gets the time string from the specified server and port and returns it.
|
getOutputStream_connectAction_, addProtocolCommandListener, applySocketAttributes, checkOpenOutputStream, connect, connect, connect, connect, connect, connect, createCommandSupport, disconnect, fireCommandSent, fireReplyReceived, getCharset, getCommandSupport, getConnectTimeout, getDefaultPort, getDefaultTimeout, getHostAddress, getHostAddress, getKeepAlive, getLocalAddress, getLocalPort, getProxy, getReceiveBufferSize, getRemoteAddress, getRemoteInetSocketAddress, getRemotePort, getSendBufferSize, getServerSocketFactory, getSoLinger, getSoTimeout, getTcpNoDelay, isAvailable, isConnected, removeProtocolCommandListener, setCharset, setConnectTimeout, setDefaultPort, setDefaultTimeout, setKeepAlive, setProxy, setReceiveBufferSize, setSendBufferSize, setServerSocketFactory, setSocketFactory, setSoLinger, setSoTimeout, setTcpNoDelay, verifyRemotepublic static final int DEFAULT_PORT
public EchoTCPClient()
DEFAULT_PORT.public InputStream getInputStream()
disconnect
to clean up properly.