Class Client

java.lang.Object
  |
  +--Client
All Implemented Interfaces:
java.lang.Runnable

public class Client
extends java.lang.Object
implements java.lang.Runnable

Note: This class must be compiled and run with Java version 1.4 or later.

This class reproduces a denial of service attack by sending urgent data. It connects to a server on the specified host and port and then exchanges messages with the server, checking that each message returned is identical to the one sent. Each message sent is followed by an urgent data byte. Invoke this program from the command line with:

 java Client [-h host] [-p port] [-n number] [-c count] [-v]
 

where:

-h host
is the name of the host where the server is running. The default is localhost.
-p port
is the port on which the server accepts connections. The default is 8000.
-n number
is the number of simultaneous clients to create. The default is 1.
-c count
is the count of messages each client sends. The default is 10.
-v
enables verbose output in which the program prints each message received. The default is no verbose output.

Version:
15 Dec 2001
Author:
John Neffenger
See Also:
Server

Method Summary
static void main(java.lang.String[] args)
          Reads the command arguments and starts the test.
 void run()
          The body of the client test.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

run

public void run()
The body of the client test.

Specified by:
run in interface java.lang.Runnable

main

public static void main(java.lang.String[] args)
                 throws java.io.IOException
Reads the command arguments and starts the test.

Parameters:
args - the command line arguments.
Throws:
java.io.IOException - when an error occurs creating the connection to the server.