java.lang.Object
com.act365.net.echo.EchoClient
- class EchoClient
- extends java.lang.Object
EchoClient acts as the client for the TCP echo service.
Usage: EchoClient -p protocol -i inputfile -o outputfile -l localhost localport hostname hostport.
-p protocol (optional) defines the socket protocol to be used.
By default, the JDK TCP implementation will be used. The alternatives are
TCPJ, RawTCP or RawTCPJ. (NB The RawTCP protocol will behave identically to TCP
because no DatagramSocket objects will be instantiated. However, a
DatagramSocket is always used by TCPJ, so the behaviour of TCPJ
and RawTCPJ will differ).
-i inputfile (optional) defines the file from which input will
be read. By default, standard input will be used.
-o outfile (optional) defines the file to which all output will
be written. By default, standard output will be used.
-l localhost localport (optional) should be specified if the protocol
has been set to RawTCPJ. The information will be used to construct the IP header.
hostname port define the remote echo server.
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
EchoClient
public EchoClient(java.io.InputStreamReader localIn,
java.io.OutputStreamWriter serverOut,
java.io.InputStream serverIn,
java.io.OutputStreamWriter localOut)
main
public static void main(java.lang.String[] args)