Index: trunk/src/subprojects/network/Makefile.am
===================================================================
--- trunk/src/subprojects/network/Makefile.am	(revision 5996)
+++ trunk/src/subprojects/network/Makefile.am	(revision 6139)
@@ -11,5 +11,5 @@
 network_LDADD = $(MAINSRCDIR)/lib/network/libORXnet.a \
                 \
-                $(MAINSRCDIR)/lib/tinyxml/libtinyxml.a
+                $(MAINSRCDIR)/lib/parser/tinyxml/libtinyxml.a
 
 network_SOURCES=  network_unit_test.cc \
Index: trunk/src/subprojects/network/network_unit_test.cc
===================================================================
--- trunk/src/subprojects/network/network_unit_test.cc	(revision 5996)
+++ trunk/src/subprojects/network/network_unit_test.cc	(revision 6139)
@@ -11,4 +11,5 @@
 #include "network_stream.h"
 #include "synchronizeable.h"
+#include "converter.h"
 
 #include "simple_sync.h"
@@ -40,19 +41,19 @@
   server.listen(9999);
 
-  NetworkSocket client1(ip);
-
-  NetworkSocket server1 = server.getNewSocket();
-
-  NetworkSocket client2(ip);
-
-  NetworkSocket server2 = server.getNewSocket();
+  NetworkSocket* client1 = new NetworkSocket(ip);
+
+  NetworkSocket* server1 = server.getNewSocket();
+
+  NetworkSocket* client2 = new NetworkSocket(ip);
+
+  NetworkSocket* server2 = server.getNewSocket();
 
   char buf[1024];
 
   printf("read from client1 before sending data\n");
-  printf("result: %d bytes\n", client1.readPacket((byte*)buf, 1024));
+  printf("result: %d bytes\n", client1->readPacket((byte*)buf, 1024));
 
   printf("read from client2 before sending data\n");
-  printf("result: %d bytes\n", client2.readPacket((byte*)buf, 1024));
+  printf("result: %d bytes\n", client2->readPacket((byte*)buf, 1024));
 
   int n;
@@ -61,16 +62,16 @@
   char * str3 = "client2 to server";
   char * str4 = "server2 to client";
-  n = client1.writePacket((byte*)str1, strlen(str1)+1);
+  n = client1->writePacket((byte*)str1, strlen(str1)+1);
   printf("%d bytes send from client1\n", n);
-  n = server1.writePacket((byte*)str2, strlen(str2)+1);
+  n = server1->writePacket((byte*)str2, strlen(str2)+1);
   printf("%d bytes send from server1\n", n);
-  n = client2.writePacket((byte*)str3, strlen(str3)+1);
+  n = client2->writePacket((byte*)str3, strlen(str3)+1);
   printf("%d bytes send from client2\n", n);
-  n = server2.writePacket((byte*)str4, strlen(str4)+1);
+  n = server2->writePacket((byte*)str4, strlen(str4)+1);
   printf("%d bytes send from server2\n", n);
   SDL_Delay(1000);
 
   printf("read from server1\n");
-  n = server1.readPacket((byte*)buf, 1024);
+  n = server1->readPacket((byte*)buf, 1024);
   printf("read %d bytes\n", n);
   if (n<0)
@@ -80,5 +81,5 @@
 
   printf("read from server2\n");
-  n = server2.readPacket((byte*)buf, 1024);
+  n = server2->readPacket((byte*)buf, 1024);
   printf("read %d bytes\n", n);
   if (n<0)
@@ -88,5 +89,5 @@
 
   printf("read from client1\n");
-  n = client1.readPacket((byte*)buf, 1024);
+  n = client1->readPacket((byte*)buf, 1024);
   printf("read %d bytes\n", n);
   if (n<0)
@@ -96,5 +97,5 @@
 
   printf("read from client2\n");
-  n = client2.readPacket((byte*)buf, 1024);
+  n = client2->readPacket((byte*)buf, 1024);
   printf("read %d bytes\n", n);
   if (n<0)
@@ -106,10 +107,10 @@
 
   printf("try to send more than 255 bytes\n");
-  printf("result: %d\n", client1.writePacket((byte*)buf, 1000));
-
-  server1.writePacket((byte*)str1, strlen(str1)+1);
+  printf("result: %d\n", client1->writePacket((byte*)buf, 1000));
+
+  server1->writePacket((byte*)str1, strlen(str1)+1);
   SDL_Delay(500);
   printf("try to read with a too small buffer\n");
-  printf("result: %d\n", client1.readPacket((byte*)buf, strlen(str1)));
+  printf("result: %d\n", client1->readPacket((byte*)buf, strlen(str1)));
 
   return 0;
@@ -190,5 +191,5 @@
   Synchronizeable* ss = new SimpleSync("Server\0");
 
-  netMan->createServer(*ss, port);
+  netMan->createServer(/**ss, */port);
   SDL_Delay(20);
 
@@ -196,5 +197,5 @@
   {
     netMan->synchronize();
-    SDL_Delay(500);
+    SDL_Delay(1000);
   }
 
@@ -229,5 +230,5 @@
   Synchronizeable* ss = new SimpleSync("Client\0");
 
-  netMan->establishConnection(ip, *ss);
+  netMan->establishConnection((const char*)"localhost", port/*,ip, *ss*/);
 
   for(;;)
@@ -280,4 +281,53 @@
   delete ss;
 
+  return 0;
+}
+
+
+int converter(int argc, char** argv)
+{
+  int x = 200564786;
+  printf("To convert: %i\n", x);
+  byte* res = Converter::intToByteArray(x);
+  for (int i = 0; i < 4; i++)
+    printf("%i  ", res[i]);
+  printf("\n");
+  
+  int z = Converter::byteArrayToInt(res);
+  
+  printf("ReConvert: %i\n", z);
+
+  
+  //float a = 5.4f;
+  //float b = 2.0f;
+  //printf("%f mod %f = %f", a, b, a % b);
+  
+  printf("\n");
+  
+  float y;
+  char* s;
+  
+  y = 12.0f;
+  s = Converter::floatToBinString(y);
+  printf("%f = ", y);
+  printf(s); printf("\n");
+  
+  y = 24549026.0f;
+  s = Converter::floatToBinString(y);
+  printf("%f = ", y);
+  printf(s); printf("\n");
+  
+  y = 12.4e20f;
+  s = Converter::floatToBinString(y);
+  printf("%f = ", y);
+  printf(s); printf("\n");
+  
+  y = 4.7824f;
+  s = Converter::floatToBinString(y);
+  printf("%f = ", y);
+  printf(s); printf("\n");
+  
+  
+  
   return 0;
 }
@@ -308,4 +358,6 @@
     else if (! strcmp( "--listen", argv[i]) || !strcmp("-l", argv[i]))
       return startListen(argc, argv);
+    else if (! strcmp( "--converter", argv[i]) || !strcmp("-o", argv[i]))
+      return converter(argc, argv);
   }
 
Index: trunk/src/subprojects/network/read_sync.cc
===================================================================
--- trunk/src/subprojects/network/read_sync.cc	(revision 5996)
+++ trunk/src/subprojects/network/read_sync.cc	(revision 6139)
@@ -80,5 +80,5 @@
  *  read data from Synchronizeable
  */
-int ReadSync::readBytes(byte* data)
+int ReadSync::readBytes(byte* data, int maxLength, int * reciever)
 {
   return 0;
Index: trunk/src/subprojects/network/read_sync.h
===================================================================
--- trunk/src/subprojects/network/read_sync.h	(revision 5996)
+++ trunk/src/subprojects/network/read_sync.h	(revision 6139)
@@ -17,5 +17,5 @@
 
     virtual void writeBytes(const byte* data, int length);
-    virtual int readBytes(byte* data);
+    virtual int readBytes(byte* data, int maxLength, int * reciever);
 
 
Index: trunk/src/subprojects/network/simple_sync.cc
===================================================================
--- trunk/src/subprojects/network/simple_sync.cc	(revision 5996)
+++ trunk/src/subprojects/network/simple_sync.cc	(revision 6139)
@@ -86,5 +86,5 @@
  *  read data from Synchronizeable
  */
-int SimpleSync::readBytes(byte* data)
+int SimpleSync::readBytes(byte* data, int maxLength, int * reciever)
 {
   PRINTF(0)("SimpleSync: sent %i bytes of data\n", this->outLength);
Index: trunk/src/subprojects/network/simple_sync.h
===================================================================
--- trunk/src/subprojects/network/simple_sync.h	(revision 5996)
+++ trunk/src/subprojects/network/simple_sync.h	(revision 6139)
@@ -17,5 +17,5 @@
 
     virtual void writeBytes(const byte* data, int length);
-    virtual int readBytes(byte* data);
+    virtual int readBytes(byte* data, int maxLength, int * reciever);
 
 
Index: trunk/src/subprojects/network/write_sync.cc
===================================================================
--- trunk/src/subprojects/network/write_sync.cc	(revision 5996)
+++ trunk/src/subprojects/network/write_sync.cc	(revision 6139)
@@ -86,5 +86,5 @@
  *  read data from Synchronizeable
  */
-int WriteSync::readBytes(byte* data)
+int WriteSync::readBytes(byte* data, int maxLength, int * reciever)
 {
   PRINTF(0)("WriteSync: sent %i bytes of data\n", this->outLength);
Index: trunk/src/subprojects/network/write_sync.h
===================================================================
--- trunk/src/subprojects/network/write_sync.h	(revision 5996)
+++ trunk/src/subprojects/network/write_sync.h	(revision 6139)
@@ -17,5 +17,5 @@
 
     virtual void writeBytes(const byte* data, int length);
-    virtual int readBytes(byte* data);
+    virtual int readBytes(byte* data, int maxLength, int * reciever);
 
 
