From 469bbcf0701e1eb8a6670c23145b0da87357e178 Mon Sep 17 00:00:00 2001 From: Mike Buland Date: Sun, 25 Mar 2012 20:00:08 +0000 Subject: Code is all reorganized. We're about ready to release. I should write up a little explenation of the arrangement. --- src/multiserver.h | 57 ------------------------------------------------------- 1 file changed, 57 deletions(-) delete mode 100644 src/multiserver.h (limited to 'src/multiserver.h') diff --git a/src/multiserver.h b/src/multiserver.h deleted file mode 100644 index e3b3ec3..0000000 --- a/src/multiserver.h +++ /dev/null @@ -1,57 +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. - */ - -#ifndef BU_MULTI_SERVER_H -#define BU_MULTI_SERVER_H - -#include "bu/server.h" -#include "bu/hash.h" - -namespace Bu -{ - class Protocol; - class Client; - - template - Protocol *genProtocol() - { - return new T; - } - - class MultiServer : protected Server - { - public: - MultiServer(); - virtual ~MultiServer(); - - void addProtocol( Protocol *(*proc)(), int iPort, int nPoolSize=40 ); - void addProtocol( Protocol *(*proc)(), const String &sAddr, int iPort, - int nPoolSize=40 ); - - void scan() - { - Server::scan(); - } - - void setTimeout( int nTimeoutSec, int nTimeoutUSec=0 ) - { - Server::setTimeout( nTimeoutSec, nTimeoutUSec ); - } - - virtual void onNewConnection( Client *pClient, int nPort ); - virtual void onClosedConnection( Client *pClient ); - - void shutdown(); - - void tick(); - - private: - Bu::Hash hProtos; - }; -} - -#endif -- cgit v1.2.3