summaryrefslogtreecommitdiff
path: root/java/tests/Connection/ServerHandler.java
diff options
context:
space:
mode:
authornobody <nobody@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>1996-11-12 21:39:32 +0000
committernobody <nobody@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>1996-11-12 21:39:32 +0000
commit6c8d74487fcf8c8418ff5205d0bc08dd99e1e34e (patch)
tree557e544d8274c8e0404d336c0e9b0e6cb36e7e72 /java/tests/Connection/ServerHandler.java
parentadd7fcff0bc337851545e695aaf25c8c64b547b5 (diff)
downloadATCD-java-1_0_1a.tar.gz
This commit was manufactured by cvs2svn to create tag 'java-1_0_1a'.java-1_0_1a
Diffstat (limited to 'java/tests/Connection/ServerHandler.java')
-rw-r--r--java/tests/Connection/ServerHandler.java68
1 files changed, 0 insertions, 68 deletions
diff --git a/java/tests/Connection/ServerHandler.java b/java/tests/Connection/ServerHandler.java
deleted file mode 100644
index d46a6e1e125..00000000000
--- a/java/tests/Connection/ServerHandler.java
+++ /dev/null
@@ -1,68 +0,0 @@
-// ============================================================================
-//
-// = PACKAGE
-// tests.Connection
-//
-// = FILENAME
-// ServerHandler.java
-//
-// = AUTHOR
-// Prashant Jain
-//
-// ============================================================================
-package tests.Connection;
-
-import java.io.*;
-import java.net.*;
-import ACE.OS.*;
-import ACE.Connection.*;
-
-public class ServerHandler extends SvcHandler
-{
- public ServerHandler ()
- {
- }
-
- public int open (Object obj)
- {
- new Thread (this).start ();
- return 0;
- }
-
- public void run ()
- {
- int msg_len;
- System.out.println ("Waiting for messages...");
- try
- {
- while (true)
- {
- StringBuffer msg = new StringBuffer ();
- msg_len = this.peer ().recv (msg);
- if (msg_len == 0)
- break;
- System.out.println ("Received: " + msg);
- this.peer ().send (new StringBuffer ("Got it!"));
- }
- }
- catch (NullPointerException e)
- {
- ACE.ERROR ("connection reset by peer");
- }
- catch (IOException e)
- {
- ACE.ERROR (e);
- }
- finally
- {
- try
- {
- this.peer ().close ();
- }
- catch (IOException e)
- {
- }
- }
-
- }
-}