examples.unix
Class chargen
java.lang.Object
examples.unix.chargen
public final class chargen
- extends java.lang.Object
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]
Method Summary |
static void |
chargenTCP(java.lang.String host)
|
static void |
chargenUDP(java.lang.String host)
|
static void |
main(java.lang.String[] args)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
chargen
public chargen()
chargenTCP
public static final void chargenTCP(java.lang.String host)
throws java.io.IOException
- Throws:
java.io.IOException
chargenUDP
public static final void chargenUDP(java.lang.String host)
throws java.io.IOException
- Throws:
java.io.IOException
main
public static final void main(java.lang.String[] args)
Copyright © 2001-2011 Apache Software Foundation. All Rights Reserved.