Class chargen
java.lang.Object
org.apache.commons.net.examples.unix.chargen
This is an example program demonstrating how to use the CharGenTCPClient and CharGenUDPClient classes. This program connects to the default chargen service
port of a specified server, then reads 100 lines from of generated output, writing each line to standard output, and then closes the connection. The UDP
invocation of the program sends 50 datagrams, printing the reply to each. The default is to use the TCP port. Use the -udp flag to use the UDP port.
Usage: chargen [-udp]
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic void
chargenTCP
(String host) static void
chargenUDP
(String host) static void
-
Constructor Details
-
chargen
public chargen()
-
-
Method Details
-
chargenTCP
- Throws:
IOException
-
chargenUDP
- Throws:
IOException
-
main
-