From 2ef2fe7ca69ee6d3b09e3fe4062f5df4dcf93358 Mon Sep 17 00:00:00 2001 From: bdemsky Date: Thu, 8 Mar 2007 02:14:57 +0000 Subject: [PATCH] test client --- Robust/src/Benchmarks/Chat/NetsClient.java | 30 +++++++++++++++++----- 1 file changed, 23 insertions(+), 7 deletions(-) diff --git a/Robust/src/Benchmarks/Chat/NetsClient.java b/Robust/src/Benchmarks/Chat/NetsClient.java index df038e8f..f57a8120 100644 --- a/Robust/src/Benchmarks/Chat/NetsClient.java +++ b/Robust/src/Benchmarks/Chat/NetsClient.java @@ -32,7 +32,7 @@ public class NetsClient extends Thread { NetsClient[] tarray=new NetsClient[numberofclients]; for (int i = 0; i < numberofclients; i++) { - String room="room"; + String room="test"; tarray[i] = new NetsClient(i, host, port, numberofmessages, numberofclients, room); if (debug) @@ -53,6 +53,10 @@ public class NetsClient extends Thread { } long endtime=System.currentTimeMillis(); + int messages=0; + for(int i=0;i0) { + int nchar=in.read(); + if (nchar==10) + lines++; + } } pout.flush(); + long time=System.currentTimeMillis(); + while((System.currentTimeMillis()-time)<5*1000) { + if(in.available()>0) { + int nchar=in.read(); + time=System.currentTimeMillis(); + if (nchar==10) + lines++; + } + } } catch (UnknownHostException e ) {System.out.println("can't find host"); } -- 2.34.1