From 4b9289cfb260f4bcecaf23a810584ef6ef8e8501 Mon Sep 17 00:00:00 2001 From: Mike Buland Date: Wed, 30 Mar 2011 22:33:41 +0000 Subject: Ok, string stuff is working much, much better, a load of new unit tests have been added, and I deleted a whole slew of stupid old tests that I don't need. --- src/tests/socketblock.cpp | 56 ----------------------------------------------- 1 file changed, 56 deletions(-) delete mode 100644 src/tests/socketblock.cpp (limited to 'src/tests/socketblock.cpp') diff --git a/src/tests/socketblock.cpp b/src/tests/socketblock.cpp deleted file mode 100644 index e36bb33..0000000 --- a/src/tests/socketblock.cpp +++ /dev/null @@ -1,56 +0,0 @@ -/* - * Copyright (C) 2007-2011 Xagasoft, All rights reserved. - * - * This file is part of the libbu++ library and is released under the - * terms of the license contained in the file LICENSE. - */ - -#include "bu/ito.h" -#include "bu/tcpsocket.h" -#include "bu/tcpserversocket.h" -#include -#include - -class TstServer : public Bu::Ito -{ -public: - TstServer() : - s( 55678 ) - { - } - - virtual void run() - { - Bu::TcpSocket c = s.accept( 45, 0 ); - printf("TstServer: Accetped connection.\n"); fflush( stdout ); - - sleep( 1 ); - printf("TstServer: Trying to read 10 bytes...\n"); fflush( stdout ); - - char buf[10]; - size_t nRead = c.read( buf, 10 ); - printf("TstServer: Got %d bytes...\n", nRead ); fflush( stdout ); - - printf("TstServer: Closing connection...\n"); fflush( stdout ); - c.close(); - } - - Bu::TcpServerSocket s; -}; - -int main() -{ - TstServer ts; - - ts.start(); - - printf("main: Connecting to server.\n"); fflush( stdout ); - Bu::TcpSocket s( "localhost", 55678 ); - - printf("main: Sending 4 bytes.\n"); fflush( stdout ); - s.write( "aoeu", 4 ); - - printf("main: Sleeping 10 seconds for good measure.\n"); fflush( stdout ); - sleep( 10 ); -} - -- cgit v1.2.3