Index: branches/network/src/lib/network/data_stream.cc
===================================================================
--- branches/network/src/lib/network/data_stream.cc	(revision 5561)
+++ branches/network/src/lib/network/data_stream.cc	(revision 5562)
@@ -15,8 +15,8 @@
 
 /* include Data_stream Header */
-#include "Data_stream.h"
+#include "data_stream.h"
 
 
-#include "netdefs.h"
+
 
 /* using namespace std is default, this needs to be here */
@@ -25,7 +25,7 @@
 
 /**
- *  standart constructor
+ * This constructor creates a new DataStream and connects it to both streams (upStream, downStream)
  */
-void DataStream::DataStream()
+DataStream::DataStream(DataStream& upStream, DataStream& downStream)
 { 
      
@@ -33,7 +33,15 @@
 
 /**
+ * This constructor creates a new DataStream and connects it to a synchronizeable object and the NetworkSocket
+ */
+DataStream::DataStream(Synchronizeable& sync, NetworkSocket& socket)
+{
+ 
+}
+
+/**
  *  standart deconstructor
  */
-void DataStream::~DataStream()
+DataStream::~DataStream()
 {
      
@@ -41,23 +49,41 @@
 
 /**
- *  connects the stream to write and read on sockets
+ * This function connects this stream to another stream. The connected DataStream is an up-stream, meaning 
+ * that the stream is "further away" from the NetworkSocket. The local reference upStream will be set to this
+ * Stream
  */
-void DataStream::connectStream()
+void DataStream::connectUpStream(DataStream& upStream)
 {
      
 }
 
-
 /**
- *  disconnects the running stream
+ * This function connects this stream to another stream. The connected DataStream is an down-stream, meaning 
+ * that the stream is "closer" to the NetworkSocket.
  */
-void DataStream::disconnectStream()
+void DataStream::connectDownStream(DataStream& upStream)
 {
      
 }
 
+/**
+ * This function disconnects the upStream and sets it to NULL
+ */
+void DataStream::disconnectUpStream()
+{
+     
+}
 
 /**
- *  processing incoming or outgoing data
+ * This function disconnects the downStream and sets it to NULL
+ */
+void DataStream::disconnectDownStream()
+{
+     
+}
+
+/**
+ * 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()
@@ -68,5 +94,6 @@
 
 /**
- *  method to write data into a networksocket
+ * This function writes the binary data to the local data. You will have to copy each byte and not only dublicate
+ * it.
  */
 void DataStream::write()
@@ -77,7 +104,9 @@
 
 /**
- * method to read data from a networksocket
+ * This function returns a reference to the local upData data array. So it can be read by an upper Stream
+ * The reading function will have to copy the whole data and musn't just reference it!
+ * This function is only called from other connected DataStreams to read the data.
  */
-void DataStream::read()
+byte& DataStream::read()
 {
      
Index: branches/network/src/lib/network/data_stream.h
===================================================================
--- branches/network/src/lib/network/data_stream.h	(revision 5561)
+++ branches/network/src/lib/network/data_stream.h	(revision 5562)
@@ -11,8 +11,10 @@
 
 #include "base_object.h"
+#include "netdefs.h"
 
 class DataStream : public BaseObject
 {
-      DataStream();
+      DataStream(DataStream& upStream, DataStream& downStream);
+      DataStream(Synchronizeable& sync, NetworkSocket& socket);
       ~DataStream();
       
@@ -20,15 +22,24 @@
       byte inBuffer [];
       byte outBuffer [];
+      unsigned int bufferSize;
+      DataStream& upStream;
+      DataStream& downStream;
       
-      public void connectStream();
+      public:
+      void connectUpStream(DataStream& upStream);
       
-      public void disconnectStream();
+      void disconnectUpStream();
       
-      public virtual void processData();
+      void connectDownStream(DataStream& downStream);
       
-      protected virtual void write();
+      void disconnectDownStream();
       
-      protected virtual void read();      
-}
+      virtual void processData() = 0;
+      
+      protected:
+      void write(byte& data);
+      
+      byte& read();      
+};
 
 #endif /* _DATA_STREAM_ */
