Index: branches/network/src/lib/network/data_stream.cc
===================================================================
--- branches/network/src/lib/network/data_stream.cc	(revision 5648)
+++ branches/network/src/lib/network/data_stream.cc	(revision 5649)
@@ -23,4 +23,16 @@
 using namespace std;
 
+
+
+/**
+ * This is the empty construktor
+ */
+DataStream::DataStream()
+{
+  this->setClassID(CL_DATA_STREAM, "DataStream");
+}
+
+
+
 /**
  * This is the empty construktor
@@ -29,5 +41,5 @@
 {
   this->setClassID(CL_DATA_STREAM, "DataStream");
-  this->sync = &sync;
+  this->synchronizeable = &sync;
                         
 }
@@ -146,12 +158,4 @@
 }
 
-/**
- * This function moves the data from the downStream object to the upStream object and changes the data if necessary.
- * This function is virtual and therefore needs to be extended by the derived class
- */
-void DataStream::processData()
-{
-
-}
 
 /**
Index: branches/network/src/lib/network/data_stream.h
===================================================================
--- branches/network/src/lib/network/data_stream.h	(revision 5648)
+++ branches/network/src/lib/network/data_stream.h	(revision 5649)
@@ -60,5 +60,5 @@
       DataStream* downStream;
       NetworkSocket* networkSocket;
-      Synchronizeable* sync;
+      Synchronizeable* synchronizeable;
 
 };
Index: branches/network/src/lib/network/netdefs.h
===================================================================
--- branches/network/src/lib/network/netdefs.h	(revision 5648)
+++ branches/network/src/lib/network/netdefs.h	(revision 5649)
@@ -20,3 +20,8 @@
 
 
+typedef enum {
+  NET_SERVER,
+  NET_CLIENT
+} NodeType;
+
 #endif /* _NETWORK_MANAGER */
Index: branches/network/src/lib/network/network_manager.cc
===================================================================
--- branches/network/src/lib/network/network_manager.cc	(revision 5648)
+++ branches/network/src/lib/network/network_manager.cc	(revision 5649)
@@ -130,5 +130,16 @@
   PRINTF(0)("Establish connection...\n");
   /* creating a new network stream, it will register itself automaticaly to the class list */
-  NetworkStream* netStream = new NetworkStream(address, sync);
+  NetworkStream* netStream = new NetworkStream(address, sync, NET_CLIENT);
+}
+
+/**
+ *  creates a new NetworkStream of server type
+ * @param sync: the listener
+ */
+NetworkStream& NetworkManager::createServer(Synchronizeable& sync, int port)
+{
+  PRINTF(0)("Create a new server socket...\n");
+  /* creating a new network stream, it will register itself automaticaly to the class list */
+  NetworkStream* netStream = new NetworkStream(sync, port, NET_SERVER);
 }
 
@@ -152,5 +163,12 @@
   if (this->netStreamList != NULL || (this->netStreamList = ClassList::getList(CL_NETWORK_STREAM)) != NULL)
   {
-    
+    tIterator<BaseObject>* iterator = this->netStreamList->getIterator();
+    NetworkStream* stream = (NetworkStream*)(iterator->firstElement());
+    while( stream)
+    {
+      stream->processData();
+      stream = (NetworkStream*)(iterator->nextElement());
+    }
+    delete iterator;
   }
 
Index: branches/network/src/lib/network/network_manager.h
===================================================================
--- branches/network/src/lib/network/network_manager.h	(revision 5648)
+++ branches/network/src/lib/network/network_manager.h	(revision 5649)
@@ -35,4 +35,5 @@
   NetworkStream& establishConnection(IPaddress& address, Synchronizeable& sync);
   NetworkStream& establishConnection(const char& hostName, const Synchronizeable& sync);
+  NetworkStream& createServer(Synchronizeable& sync, int port);
   void shutdownConnection();
   
Index: branches/network/src/lib/network/network_stream.cc
===================================================================
--- branches/network/src/lib/network/network_stream.cc	(revision 5648)
+++ branches/network/src/lib/network/network_stream.cc	(revision 5649)
@@ -27,5 +27,5 @@
 #include "synchronizeable.h"
 #include "list.h"
-
+#include "debug.h"
 
 /* include your own header */
@@ -37,5 +37,6 @@
 
 
-NetworkStream::NetworkStream()
+NetworkStream::NetworkStream() 
+  : DataStream()
 {
   this->init();
@@ -47,9 +48,17 @@
 
 
-NetworkStream::NetworkStream(IPaddress& address, Synchronizeable& sync) 
+NetworkStream::NetworkStream(IPaddress& address, Synchronizeable& sync, NodeType type) 
   : DataStream(sync)
 {
   this->init();
-  this->networkSocket = new NetworkSocket();
+  this->networkSocket = new NetworkSocket(/* address, type */);
+}
+
+
+NetworkStream::NetworkStream(Synchronizeable& sync, int port, NodeType type) 
+  : DataStream(sync)
+{
+  this->init();
+  this->networkSocket = new NetworkSocket(/* address, type */);
 }
 
@@ -64,6 +73,6 @@
 NetworkStream::~NetworkStream()
 {
- delete networkSockets;
- delete synchronizeables;
+ delete networkSocket;
+ delete synchronizeable;
  delete connectionMonitor;
 
@@ -72,11 +81,12 @@
 void NetworkStream::processData()
 {
+  PRINTF(0)("process data\n");
   byte data[10] ; // obsolete, for debugging only
   byte* test = (byte *)data[0]; // obsolete, for debugging only
   int ret = 0;
-  this->synchronizeables->writeByteStream(NULL);
-  ret = this->networkSockets->writeBytes(NULL,1);
-  test = this->synchronizeables->readByteStream();
-  ret = this->networkSockets->readBytes(test,1);
+  this->synchronizeable->writeByteStream(NULL);
+  ret = this->networkSocket->writeBytes(NULL,1);
+  test = this->synchronizeable->readByteStream();
+  ret = this->networkSocket->readBytes(test,1);
 }
 
Index: branches/network/src/lib/network/network_stream.h
===================================================================
--- branches/network/src/lib/network/network_stream.h	(revision 5648)
+++ branches/network/src/lib/network/network_stream.h	(revision 5649)
@@ -13,10 +13,11 @@
 class ConnectionMonitor;
 
-class NetworkStream : public virtual DataStream
+class NetworkStream : public DataStream
 {
 
 public:
   NetworkStream();
-  NetworkStream(IPaddress& address, Synchronizeable& sync);
+  NetworkStream(IPaddress& address, Synchronizeable& sync, NodeType type);
+  NetworkStream(Synchronizeable& sync, int port, NodeType type);
   
   ~NetworkStream();
