aboutsummaryrefslogtreecommitdiff
path: root/src/server.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/server.cpp')
-rw-r--r--src/server.cpp11
1 files changed, 8 insertions, 3 deletions
diff --git a/src/server.cpp b/src/server.cpp
index abf4c5b..bceeb81 100644
--- a/src/server.cpp
+++ b/src/server.cpp
@@ -1,5 +1,8 @@
1#include "server.h" 1#include "bu/server.h"
2#include <errno.h> 2#include <errno.h>
3#include "bu/serversocket.h"
4#include "bu/client.h"
5#include "bu/socket.h"
3 6
4Bu::Server::Server() : 7Bu::Server::Server() :
5 nTimeoutSec( 0 ), 8 nTimeoutSec( 0 ),
@@ -58,7 +61,7 @@ void Bu::Server::scan()
58 } 61 }
59 else 62 else
60 { 63 {
61 64 hClients.get( j )->processInput();
62 } 65 }
63 } 66 }
64 } 67 }
@@ -68,7 +71,9 @@ void Bu::Server::addClient( int nSocket, int nPort )
68{ 71{
69 FD_SET( nSocket, &fdActive ); 72 FD_SET( nSocket, &fdActive );
70 73
71 Client *c = new Client(); 74 Client *c = new Client(
75 new Bu::Socket( nSocket )
76 );
72 hClients.insert( nSocket, c ); 77 hClients.insert( nSocket, c );
73 78
74 onNewConnection( c, nPort ); 79 onNewConnection( c, nPort );