aboutsummaryrefslogtreecommitdiff
path: root/src/server.cpp
diff options
context:
space:
mode:
authorMike Buland <eichlan@xagasoft.com>2007-06-12 01:28:27 +0000
committerMike Buland <eichlan@xagasoft.com>2007-06-12 01:28:27 +0000
commit4cb166570a8e2e97216bf6c7aeb99b971ff58ad7 (patch)
treeb8d22af96957666ac761b6ca1b57da1eee2e56a5 /src/server.cpp
parentb6f50f249ba3b18c597531a2d5dbc45f7bfa3eaa (diff)
downloadlibbu++-4cb166570a8e2e97216bf6c7aeb99b971ff58ad7.tar.gz
libbu++-4cb166570a8e2e97216bf6c7aeb99b971ff58ad7.tar.bz2
libbu++-4cb166570a8e2e97216bf6c7aeb99b971ff58ad7.tar.xz
libbu++-4cb166570a8e2e97216bf6c7aeb99b971ff58ad7.zip
Moved out the xml system again. I think that if I am going to do it again,
I'm going to do it over from scratch, that was just painful. Also, started in again on the server system, it's looking pretty good, already got connections working, next up is managing data flow through clients and protocols!
Diffstat (limited to 'src/server.cpp')
-rw-r--r--src/server.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/server.cpp b/src/server.cpp
index f93238c..abf4c5b 100644
--- a/src/server.cpp
+++ b/src/server.cpp
@@ -53,7 +53,8 @@ void Bu::Server::scan()
53 { 53 {
54 if( hServers.has( j ) ) 54 if( hServers.has( j ) )
55 { 55 {
56 addClient( hServers.get( j )->accept() ); 56 ServerSocket *pSrv = hServers.get( j );
57 addClient( pSrv->accept(), pSrv->getPort() );
57 } 58 }
58 else 59 else
59 { 60 {
@@ -63,11 +64,13 @@ void Bu::Server::scan()
63 } 64 }
64} 65}
65 66
66void Bu::Server::addClient( int nSocket ) 67void Bu::Server::addClient( int nSocket, int nPort )
67{ 68{
68 FD_SET( nSocket, &fdActive ); 69 FD_SET( nSocket, &fdActive );
69 70
70 Client *c = new Client(); 71 Client *c = new Client();
71 hClients.insert( nSocket, c ); 72 hClients.insert( nSocket, c );
73
74 onNewConnection( c, nPort );
72} 75}
73 76