aboutsummaryrefslogtreecommitdiff
path: root/src/test
diff options
context:
space:
mode:
authorMike Buland <eichlan@xagasoft.com>2006-08-25 22:07:53 +0000
committerMike Buland <eichlan@xagasoft.com>2006-08-25 22:07:53 +0000
commite1f398363812115611d20c0c803802c78ed65974 (patch)
tree0a685408d2a720f8ae9293692aeda17c80c8bc10 /src/test
parent0a700ced28520be170c0965191f2450a2e4a82ac (diff)
downloadlibbu++-e1f398363812115611d20c0c803802c78ed65974.tar.gz
libbu++-e1f398363812115611d20c0c803802c78ed65974.tar.bz2
libbu++-e1f398363812115611d20c0c803802c78ed65974.tar.xz
libbu++-e1f398363812115611d20c0c803802c78ed65974.zip
Fixed the connection manager to not suck with the new connection read api.
Diffstat (limited to '')
-rw-r--r--src/test/clistress/main.cpp23
1 files changed, 1 insertions, 22 deletions
diff --git a/src/test/clistress/main.cpp b/src/test/clistress/main.cpp
index 3f5038b..0869945 100644
--- a/src/test/clistress/main.cpp
+++ b/src/test/clistress/main.cpp
@@ -1,26 +1,5 @@
1#include "connection.h" 1#include "connection.h"
2 2
3void _waitForLength( Connection &con, int len)
4{
5 int rlen = con.getInputAmnt();
6
7 if (rlen >= len)
8 return;
9
10 int time_left = 5;
11 int mic_left = 0;
12
13 while (rlen < len)
14 {
15 if (time_left == 0 && mic_left == 0)
16 {
17 throw "Socket Timeout";
18 }
19 con.readInput(time_left, mic_left, &time_left, &mic_left);
20 rlen = con.getInputAmnt();
21 }
22}
23
24int main() 3int main()
25{ 4{
26 Connection c; 5 Connection c;
@@ -30,7 +9,7 @@ int main()
30 c.appendOutput("d"); 9 c.appendOutput("d");
31 c.writeOutput(); 10 c.writeOutput();
32 11
33 _waitForLength( c, 40 ); 12 c.waitForInput( 5, 40, 0 );
34 13
35 c.close(); 14 c.close();
36 15