Index: branches/network/src/lib/network/handshake.cc
===================================================================
--- branches/network/src/lib/network/handshake.cc	(revision 7602)
+++ branches/network/src/lib/network/handshake.cc	(revision 7613)
@@ -59,5 +59,5 @@
 
   this->setSynchronized(true);
-  PRINTF(5)("Handshake created clientId = %d\n", clientId);
+  PRINTF(0)("Handshake created clientId = %d\n", clientId);
 }
 
Index: branches/network/src/lib/network/network_stream.cc
===================================================================
--- branches/network/src/lib/network/network_stream.cc	(revision 7602)
+++ branches/network/src/lib/network/network_stream.cc	(revision 7613)
@@ -369,4 +369,6 @@
       peers[clientId].handshake->setUniqueID(clientId);
       peers[clientId].userId = clientId;
+      
+      PRINTF(0)("num sync: %d\n", synchronizeables.size());
     }
 
Index: branches/network/src/lib/network/udp_server_socket.cc
===================================================================
--- branches/network/src/lib/network/udp_server_socket.cc	(revision 7602)
+++ branches/network/src/lib/network/udp_server_socket.cc	(revision 7613)
@@ -33,4 +33,7 @@
     bOk = false;
   }
+  
+  memset( packet->data, 0, UDP_PACKET_SIZE );
+  PRINTF(0)("PACKET DATA: %x\n", packet->data);
   
   listen( port );
Index: branches/network/src/lib/network/udp_socket.cc
===================================================================
--- branches/network/src/lib/network/udp_socket.cc	(revision 7602)
+++ branches/network/src/lib/network/udp_socket.cc	(revision 7613)
@@ -37,4 +37,9 @@
   this->packet = SDLNet_AllocPacket( UDP_PACKET_SIZE );
   
+  assert( this->packet );
+  
+  memset( packet->data, 0, UDP_PACKET_SIZE );
+  PRINTF(0)("PACKET DATA: %x\n", packet->data);
+  
   this->connectToServer( host, port );
 }
Index: branches/network/src/subprojects/network/network_unit_test.cc
===================================================================
--- branches/network/src/subprojects/network/network_unit_test.cc	(revision 7602)
+++ branches/network/src/subprojects/network/network_unit_test.cc	(revision 7613)
@@ -14,4 +14,6 @@
 #include "synchronizeable.h"
 #include "converter.h"
+#include "state.h"
+#include "shared_network_data.h"
 
 #include "simple_sync.h"
@@ -244,18 +246,19 @@
 int startServer(int argc, char** argv)
 {
-  if( argc <= 2)
-  {
-    printf(" Wrong arguments try following notations:\n");
-    printf("   --server [port number]\n");
-    return 0;
-  }
-
-  int port = atoi(argv[2]);
-  printf("Starting Server on port %i\n", port);
+
+
+  State::setOnline(true);
+  SharedNetworkData::getInstance()->setGameServer( true );
+  printf("Starting Server on port %i\n", 9999);
 
   NetworkManager* netMan = NetworkManager::getInstance();
-  Synchronizeable* ss = new SimpleSync("Server\0");
-
-  netMan->createServer(/**ss, */port);
+  
+  netMan->initialize();
+  
+  netMan->createServer(/**ss, */ 9999);
+  
+  SimpleSync* ss = new SimpleSync("Server\0");
+
+  
   SDL_Delay(20);
 
@@ -264,4 +267,5 @@
     netMan->synchronize();
     SDL_Delay(1000);
+    ss->debug();
   }
 
@@ -276,9 +280,42 @@
 int startClient(int argc, char** argv)
 {
+
+
+  State::setOnline(true);
+  NetworkManager* netMan = NetworkManager::getInstance();
+  
+
+  netMan->initialize();
+  
+  
+  
+  netMan->establishConnection("localhost", 9999);
+  
+  SimpleSync* ss = new SimpleSync("SimpleSync\0");
+  netMan->connectSynchronizeable( *ss );
+
+  for(;;)
+  {
+    netMan->synchronize();
+    SDL_Delay(1000);
+    ss->debug();
+  }
+
+
+  delete netMan;
+  delete ss;
+
+  return 0;
+}
+
+
+
+int startListen(int argc, char** argv)
+{
   if( argc < 3)
   {
     printf(" Wrong arguments try following notations:\n");
-    printf("   --client [server ip] [port number]\n");
-    printf("   --client [server name] [port number]\n");
+    printf("   --listen [server ip] [port number]\n");
+    printf("   --listen [server name] [port number]\n");
     return 0;
   }
@@ -294,44 +331,5 @@
 
   NetworkManager* netMan = NetworkManager::getInstance();
-  Synchronizeable* ss = new SimpleSync("Client\0");
-
-  netMan->establishConnection((const char*)"localhost", port/*,ip, *ss*/);
-
-  for(;;)
-  {
-    netMan->synchronize();
-    SDL_Delay(500);
-  }
-
-
-  delete netMan;
-  delete ss;
-
-  return 0;
-}
-
-
-
-int startListen(int argc, char** argv)
-{
-  if( argc < 3)
-  {
-    printf(" Wrong arguments try following notations:\n");
-    printf("   --listen [server ip] [port number]\n");
-    printf("   --listen [server name] [port number]\n");
-    return 0;
-  }
-
-  char* name = argv[2];
-  int port = atoi(argv[3]);
-  printf("Connecting to %s, on port %i\n", name, port);
-
-  IPaddress ip;
-  int error = SDLNet_ResolveHost(&ip, name, port);
-  if(error == -1)
-    printf("\n\nerror on address resolution, program inconsistancy\n\n");
-
-  NetworkManager* netMan = NetworkManager::getInstance();
-  Synchronizeable* ss = new ReadSync("WriteSync\0");
+  Synchronizeable* ss = new SimpleSync("SimpleSync\0");
 
   netMan->establishConnection( name, port );
Index: branches/network/src/subprojects/network/simple_sync.cc
===================================================================
--- branches/network/src/subprojects/network/simple_sync.cc	(revision 7602)
+++ branches/network/src/subprojects/network/simple_sync.cc	(revision 7613)
@@ -31,21 +31,7 @@
   : Synchronizeable()
 {
-  /* define the local buffer size */
-  this->outLength = 10;
-  this->recLength = 0;
-  this->inLength = 40;
-  this->outData = new byte[this->outLength];
-  this->inData = new byte[this->inLength];
-
-  /* init the buffer data */
-  for( int i = 0; i < this->outLength; i++)
-  {
-    this->outData[i] = i;
-  }
-  for( int i = 0; i < this->inLength; i++)
-  {
-    this->inData[i] = 0;
-  }
-
+  in = 0;
+  out = 1;
+  id = registerVarId( new SynchronizeableInt( &in, &out, "var" ) );
 }
 
@@ -56,68 +42,11 @@
 SimpleSync::~SimpleSync()
 {
-  if( this->outData)
-    delete[] this->outData;
-  if( this->inData)
-    delete[] this->inData;
+}
+
+void SimpleSync::debug( )
+{
+  printf("IN: %d OUT: %d\n", in, out);
 }
 
 
-/**
- *  write data to Synchronizeable
- */
-int SimpleSync::writeBytes(const byte* data, int length, int sender)
-{
-  PRINTF(0)("SimpleSync: got %i bytes of data\n", length);
-  this->recLength = length;
-  if(this->inLength < length)
-    PRINTF(0)("ERROR: local buffer is smaller than the data to receive.\n");
 
-  /* copy the data localy */
-  for( int i = 0; i < length; i++)
-  {
-    this->inData[i] = data[i];
-  }
-  /* and debug output */
-  this->writeDebug();
-}
-
-
-/**
- *  read data from Synchronizeable
- */
-int SimpleSync::readBytes(byte* data, int maxLength, int * reciever)
-{
-  PRINTF(0)("SimpleSync: sent %i bytes of data\n", this->outLength);
-
-  /* debug msg */
-  this->readDebug();
-
-  /* write the test message */
-  for( int i = 0; i < this->outLength; i++)
-    data[i] = this->outData[i];
-
-  /* return the length of the test */
-  return this->outLength;
-}
-
-
-void SimpleSync::writeDebug() const
-{
-  PRINTF(0)("Write in bytes: \t(0 <-) |");
-  for(int i = 0; i < this->recLength; i++)
-  {
-    PRINT(0)(" [%u] ",this->inData[i]);
-  }
-  PRINT(0)("|\n");
-}
-
-
-void SimpleSync::readDebug() const
-{
-  PRINTF(0)("Read out bytes: \t(0 ->) |");
-  for(int i = 0; i < this->outLength; i++)
-  {
-    PRINT(0)(" [%u] ",this->outData[i]);
-  }
-  PRINT(0)("|\n");
-}
Index: branches/network/src/subprojects/network/simple_sync.h
===================================================================
--- branches/network/src/subprojects/network/simple_sync.h	(revision 7602)
+++ branches/network/src/subprojects/network/simple_sync.h	(revision 7613)
@@ -15,20 +15,12 @@
     SimpleSync(const char* name);
     virtual ~SimpleSync();
-
-    virtual int writeBytes(const byte* data, int length, int sender);
-    virtual int readBytes(byte* data, int maxLength, int * reciever);
+    
+    void debug();
 
 
   private:
-    virtual void writeDebug() const;
-    virtual void readDebug() const;
-
-
-  private:
-    byte* inData;
-    int   inLength;
-    int   recLength;
-    byte* outData;
-    int   outLength;
+    int in;
+    int out;
+    int id;
   };
 
