From: bdemsky Date: Thu, 8 Mar 2007 02:14:57 +0000 (+0000) Subject: test client X-Git-Tag: preEdgeChange~675 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=2ef2fe7ca69ee6d3b09e3fe4062f5df4dcf93358;p=IRC.git test client --- 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"); }