From 9031e2af7dd4e65ec70890ee78a7cf600d1b2cc5 Mon Sep 17 00:00:00 2001 From: Mike Buland Date: Sat, 16 Oct 2010 03:02:11 +0000 Subject: Many, many changes. Documentation changes, renamed the socket class to TcpSocket, fixed many other things, and finally removed ParamProc. Anything that needs it will now have to switch to OptParser. --- src/server.cpp | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'src/server.cpp') diff --git a/src/server.cpp b/src/server.cpp index 51c056a..e701a69 100644 --- a/src/server.cpp +++ b/src/server.cpp @@ -8,9 +8,9 @@ #include "bu/server.h" #include #include -#include "bu/serversocket.h" +#include "bu/tcpserversocket.h" #include "bu/client.h" -#include "bu/socket.h" +#include "bu/tcpsocket.h" #include "bu/config.h" Bu::Server::Server() : @@ -28,7 +28,7 @@ Bu::Server::~Server() void Bu::Server::addPort( int nPort, int nPoolSize ) { - ServerSocket *s = new ServerSocket( nPort, nPoolSize ); + TcpServerSocket *s = new TcpServerSocket( nPort, nPoolSize ); int nSocket = s->getSocket(); FD_SET( nSocket, &fdActive ); hServers.insert( nSocket, s ); @@ -36,7 +36,7 @@ void Bu::Server::addPort( int nPort, int nPoolSize ) void Bu::Server::addPort( const FString &sAddr, int nPort, int nPoolSize ) { - ServerSocket *s = new ServerSocket( sAddr, nPort, nPoolSize ); + TcpServerSocket *s = new TcpServerSocket( sAddr, nPort, nPoolSize ); int nSocket = s->getSocket(); FD_SET( nSocket, &fdActive ); hServers.insert( nSocket, s ); @@ -75,7 +75,7 @@ void Bu::Server::scan() { if( hServers.has( j ) ) { - ServerSocket *pSrv = hServers.get( j ); + TcpServerSocket *pSrv = hServers.get( j ); addClient( pSrv->accept(), pSrv->getPort() ); } else @@ -97,7 +97,7 @@ void Bu::Server::scan() { pClient->processOutput(); } - catch( Bu::SocketException &e ) + catch( Bu::TcpSocketException &e ) { closeClient( j ); } @@ -136,7 +136,7 @@ void Bu::Server::addClient( int nSocket, int nPort ) FD_SET( nSocket, &fdActive ); Client *c = new Client( - new Bu::Socket( nSocket ), + new Bu::TcpSocket( nSocket ), new SrvClientLinkFactory() ); hClients.insert( nSocket, c ); -- cgit v1.2.3