From f4c20290509d7ed3a8fd5304577e7a4cc0b9d974 Mon Sep 17 00:00:00 2001 From: Mike Buland Date: Tue, 3 Apr 2007 03:49:53 +0000 Subject: Ok, no code is left in src, it's all in src/old. We'll gradually move code back into src as it's fixed and re-org'd. This includes tests, which, I may write a unit test system into libbu++ just to make my life easier. --- src/tests/connect.cpp | 38 -------------------------------------- 1 file changed, 38 deletions(-) delete mode 100644 src/tests/connect.cpp (limited to 'src/tests/connect.cpp') diff --git a/src/tests/connect.cpp b/src/tests/connect.cpp deleted file mode 100644 index a9fca64..0000000 --- a/src/tests/connect.cpp +++ /dev/null @@ -1,38 +0,0 @@ -#include -#include -#include -#include -#include "connection.h" - -int main() -{ - Connection c; - c.open("127.0.0.1", 12457 ); - - { - int newSocket = c.getSocket(); - int flags; - - flags = fcntl(newSocket, F_GETFL, 0); - flags |= O_NONBLOCK; - if (fcntl(newSocket, F_SETFL, flags) < 0) - { - return false; - } - } - - for( int i = 0; i < 50; i++ ) - { - usleep( 100000 ); - int nbytes = c.readInput(); - if( nbytes == 0 ) - printf("0 bytes, EOF?\n"); - else - printf("Got %d bytes, whacky...\n", nbytes ); - } - - c.close(); - - return 0; -} - -- cgit v1.2.3