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/serverticks.cpp | 69 ----------------------------------------------- 1 file changed, 69 deletions(-) delete mode 100644 src/tests/serverticks.cpp (limited to 'src/tests/serverticks.cpp') diff --git a/src/tests/serverticks.cpp b/src/tests/serverticks.cpp deleted file mode 100644 index 3872a16..0000000 --- a/src/tests/serverticks.cpp +++ /dev/null @@ -1,69 +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/server.h" -#include "bu/client.h" -#include "bu/protocol.h" -#include - -class TickProtocol : public Bu::Protocol -{ -public: - TickProtocol() - { - } - - virtual ~TickProtocol() - { - } - - virtual void onTick( Bu::Client *pClient ) - { - printf("tick!\n"); - pClient->write("tick!\n"); - } -}; - -class TickServer : public Bu::Server -{ -public: - TickServer() - { - } - - virtual ~TickServer() - { - } - - virtual void onNewConnection( Bu::Client *pClient, int ) - { - pClient->setProtocol( new TickProtocol() ); - } - - virtual void onClosedConnection( Bu::Client *pClient ) - { - delete pClient->getProtocol(); - } -}; - -int main( int , char *[] ) -{ - TickServer ts; - - ts.setTimeout( 1, 0 ); - ts.setAutoTick(); - ts.addPort( 5555 ); - - for(;;) - { - ts.scan(); - sleep( 1 ); - } - - return 0; -} - -- cgit v1.2.3