Index: branches/network/src/lib/network/network_manager.h
===================================================================
--- branches/network/src/lib/network/network_manager.h	(revision 6007)
+++ branches/network/src/lib/network/network_manager.h	(revision 6018)
@@ -47,8 +47,9 @@
     inline int getHostID() { return this->hostID; };
 
-  private:
+
     void connectSynchronizeable(Synchronizeable& sync);
     void synchronize();
 
+  private:
     NetworkManager();
 
Index: branches/network/src/lib/network/network_socket.h
===================================================================
--- branches/network/src/lib/network/network_socket.h	(revision 6007)
+++ branches/network/src/lib/network/network_socket.h	(revision 6018)
@@ -87,4 +87,6 @@
   int readPacket(byte * data, int maxLength);
 
+  inline bool isOk() { return tcpSocket!=NULL; }
+
 };
 
Index: branches/network/src/lib/network/network_stream.cc
===================================================================
--- branches/network/src/lib/network/network_stream.cc	(revision 6007)
+++ branches/network/src/lib/network/network_stream.cc	(revision 6018)
@@ -66,4 +66,6 @@
   this->networkProtocol = new NetworkProtocol();
   this->connectionMonitor = new ConnectionMonitor();
+  this->networkSockets.push_back( NULL );
+  this->bActive = true;
 }
 
@@ -111,4 +113,8 @@
 void NetworkStream::processData()
 {
+  printf("processData()");
+  if ( this->type == NET_SERVER )
+    this->updateConnectionList();
+
 #if 0
   int dataLength = 0;
@@ -178,2 +184,50 @@
 #endif
 }
+
+void NetworkStream::updateConnectionList( )
+{
+  //check for new connections
+  NetworkSocket* tempNetworkSocket = serverSocket->getNewSocket();
+
+  if ( tempNetworkSocket )
+  {
+    int clientId;
+    if ( freeSocketSlots.size() >0 )
+    {
+      clientId = freeSocketSlots.back();
+      freeSocketSlots.pop_back();
+      networkSockets[clientId] = tempNetworkSocket;
+    } else
+    {
+      networkSockets.push_back(tempNetworkSocket);
+      clientId = networkSockets.size();
+    }
+
+    PRINTF(0)("New Client: %s", clientId);
+    //TODO: start handshake
+    //new Handshake(true, clientId);
+  }
+
+
+  //check if connections are ok else remove them
+  for ( int i = 1; i<networkSockets.size(); i++)
+  {
+    if ( networkSockets[i] && !networkSockets[i]->isOk() )
+    {
+      //TODO: tell EntityManager that this player left the game
+
+      delete networkSockets[i];
+      networkSockets[i] = NULL;
+
+      if ( i == networkSockets.size()-1 )
+      {
+        networkSockets.pop_back();
+      }
+      else
+      {
+        freeSocketSlots.push_back(i);
+      }
+    }
+  }
+
+}
Index: branches/network/src/lib/network/network_stream.h
===================================================================
--- branches/network/src/lib/network/network_stream.h	(revision 6007)
+++ branches/network/src/lib/network/network_stream.h	(revision 6018)
@@ -51,4 +51,7 @@
     Header                 packetHeader;
     bool                   bActive;
+    std::list<int>         freeSocketSlots;
+
+    void updateConnectionList();
 };
 #endif /* _NETWORK_STREAM */
Index: branches/network/src/lib/network/server_socket.cc
===================================================================
--- branches/network/src/lib/network/server_socket.cc	(revision 6007)
+++ branches/network/src/lib/network/server_socket.cc	(revision 6018)
@@ -110,5 +110,5 @@
 
 
-NetworkSocket ServerSocket::getNewSocket( )
+NetworkSocket* ServerSocket::getNewSocket( )
 {
   if ( !listenSocket )
@@ -127,5 +127,5 @@
   else
   {
-    return NetworkSocket(sock);
+    return new NetworkSocket(sock);
   }
 }
Index: branches/network/src/lib/network/server_socket.h
===================================================================
--- branches/network/src/lib/network/server_socket.h	(revision 6007)
+++ branches/network/src/lib/network/server_socket.h	(revision 6018)
@@ -39,6 +39,7 @@
     ~ServerSocket();
     bool listen( unsigned int port );
-    NetworkSocket getNewSocket( void );
+    NetworkSocket* getNewSocket( void );
     void close();
+    inline bool isOk(){ return listenSocket!=NULL; }
 };
 
