diff options
author | nobody <nobody@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 1997-11-25 22:18:58 +0000 |
---|---|---|
committer | nobody <nobody@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 1997-11-25 22:18:58 +0000 |
commit | 7a5fe8ce23ac50450b804cf0183c773565ae7cef (patch) | |
tree | 220a38a6627619d1386897d42757a140b9de448f /java/tests/Connection/ClientHandler.java | |
parent | 87b0987cad99cf45cd5d9e03cd1cefbaaec4ef2a (diff) | |
download | ATCD-ACE-4_4.tar.gz |
This commit was manufactured by cvs2svn to create branch 'ACE-4_4'.ACE-4_4
Diffstat (limited to 'java/tests/Connection/ClientHandler.java')
-rw-r--r-- | java/tests/Connection/ClientHandler.java | 76 |
1 files changed, 0 insertions, 76 deletions
diff --git a/java/tests/Connection/ClientHandler.java b/java/tests/Connection/ClientHandler.java deleted file mode 100644 index 702c633ceca..00000000000 --- a/java/tests/Connection/ClientHandler.java +++ /dev/null @@ -1,76 +0,0 @@ -// ============================================================================ -// -// = PACKAGE -// tests.Connection -// -// = FILENAME -// ClientHandler.java -// -// = AUTHOR -// Prashant Jain -// -// ============================================================================ -package tests.Connection; - -import java.io.*; -import java.net.*; -import JACE.OS.*; -import JACE.Connection.*; - -public class ClientHandler extends SvcHandler -{ - public ClientHandler () - { - } - - public int open (Object obj) - { - new Thread (this).start (); - return 0; - } - - public void run () - { - DataInputStream in = new DataInputStream (System.in); - String msg; - StringBuffer ack = new StringBuffer (); - int ack_len; - try - { - while (true) - { - System.out.print ("Enter input: "); - System.out.flush (); - msg = in.readLine (); - if (msg == null) - break; - this.peer ().send (new StringBuffer (msg)); - System.out.println ("Waiting for ack..."); - ack_len = this.peer ().recv (ack); - if (ack_len == 0) - break; - else - System.out.println (ack); - } - } - catch (NullPointerException e) - { - ACE.ERROR ("connection reset by peer"); - } - catch (IOException e) - { - ACE.ERROR (e); - } - finally - { - try - { - this.peer ().close (); - } - catch (IOException e) - { - } - } - - } -} |