diff options
author | nobody <nobody@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 1998-01-06 06:50:37 +0000 |
---|---|---|
committer | nobody <nobody@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 1998-01-06 06:50:37 +0000 |
commit | 2f662b966b933653ee11f5b2f58c9be06dd3925f (patch) | |
tree | c59f73afa48ded43058e918c7414ac6186302a95 /java/tests/Connection/AcceptorTest.java | |
parent | de8d5cc38b9acbfa8f0f4acf5d7453698876f3b8 (diff) | |
download | ATCD-2f662b966b933653ee11f5b2f58c9be06dd3925f.tar.gz |
This commit was manufactured by cvs2svn to create tag 'ACE_4_4_32'.ACE_4_4_32
Diffstat (limited to 'java/tests/Connection/AcceptorTest.java')
-rw-r--r-- | java/tests/Connection/AcceptorTest.java | 79 |
1 files changed, 0 insertions, 79 deletions
diff --git a/java/tests/Connection/AcceptorTest.java b/java/tests/Connection/AcceptorTest.java deleted file mode 100644 index 0f8877f52d9..00000000000 --- a/java/tests/Connection/AcceptorTest.java +++ /dev/null @@ -1,79 +0,0 @@ -// ============================================================================ -// -// = PACKAGE -// tests.Connection -// -// = FILENAME -// AcceptorTest.java -// -// = AUTHOR -// Prashant Jain -// -// ============================================================================ -package tests.Connection; - -import java.io.*; -import java.net.*; -import JACE.OS.*; -import JACE.Connection.*; - -public class AcceptorTest -{ - void print_usage_and_die () - { - System.out.println ("Usage: test_server [<port>]"); - System.exit (0); - } - - public void init (int port) - { - try - { - Acceptor acceptor = new Acceptor (Class.forName ("tests.Connection.ServerHandler")); - acceptor.open (port); - while (true) - { - acceptor.accept (); - } - } - catch (ClassNotFoundException e) - { - ACE.ERROR (e); - } - catch (SocketException e) - { - ACE.ERROR ("Socket Exception: " + e); - } - catch (InstantiationException e) - { - ACE.ERROR (e); - } - catch (IllegalAccessException e) - { - ACE.ERROR ("Dang!" + e); - } - catch (IOException e) - { - ACE.ERROR (e); - } - } - - public static void main (String [] args) - { - int port = ACE.DEFAULT_SERVER_PORT; - AcceptorTest acceptorTest = new AcceptorTest (); - - if (args.length == 1) - { - try - { - port = Integer.parseInt (args[0]); - } - catch (NumberFormatException e) - { - acceptorTest.print_usage_and_die (); - } - } - acceptorTest.init (port); - } -} |