summaryrefslogtreecommitdiff
path: root/src/server.cpp
diff options
context:
space:
mode:
authorMike Buland <eichlan@xagasoft.com>2007-06-18 19:42:34 +0000
committerMike Buland <eichlan@xagasoft.com>2007-06-18 19:42:34 +0000
commit8b12972092777af56ae21f65b41f4c40d52c2367 (patch)
tree3ee45c4b69899acb0cdbd013ea8e6ea54bcdc023 /src/server.cpp
parent5292e5831934dc719d1ac06332bd252abe4ac3bc (diff)
downloadlibbu++-8b12972092777af56ae21f65b41f4c40d52c2367.tar.gz
libbu++-8b12972092777af56ae21f65b41f4c40d52c2367.tar.bz2
libbu++-8b12972092777af56ae21f65b41f4c40d52c2367.tar.xz
libbu++-8b12972092777af56ae21f65b41f4c40d52c2367.zip
Added the protocol class. servers work, but don't send data, updated the streams
to include many more state indicators and caps queries, and everything is working better in general.
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 );