From e1f398363812115611d20c0c803802c78ed65974 Mon Sep 17 00:00:00 2001 From: Mike Buland Date: Fri, 25 Aug 2006 22:07:53 +0000 Subject: Fixed the connection manager to not suck with the new connection read api. --- src/test/clistress/main.cpp | 23 +---------------------- 1 file changed, 1 insertion(+), 22 deletions(-) (limited to 'src/test/clistress') 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 @@ #include "connection.h" -void _waitForLength( Connection &con, int len) -{ - int rlen = con.getInputAmnt(); - - if (rlen >= len) - return; - - int time_left = 5; - int mic_left = 0; - - while (rlen < len) - { - if (time_left == 0 && mic_left == 0) - { - throw "Socket Timeout"; - } - con.readInput(time_left, mic_left, &time_left, &mic_left); - rlen = con.getInputAmnt(); - } -} - int main() { Connection c; @@ -30,7 +9,7 @@ int main() c.appendOutput("d"); c.writeOutput(); - _waitForLength( c, 40 ); + c.waitForInput( 5, 40, 0 ); c.close(); -- cgit v1.2.3