Index: /code/branches/network/src/network/CMakeLists.txt
===================================================================
--- /code/branches/network/src/network/CMakeLists.txt	(revision 1698)
+++ /code/branches/network/src/network/CMakeLists.txt	(revision 1699)
@@ -38,18 +38,6 @@
   ##### test for gamestate stuff #####
   SET( TEST_SRC_FILES
-    ConnectionManager.cc
-    GameStateManager.cc
-    PacketBuffer.cc
-    PacketDecoder.cc
-    PacketGenerator.cc
-    ClientConnection.cc
-    ClientInformation.cc
-    diffTest.cc
-    GameStateClient.cc
-    Server.cc
-    Client.cc  
-    Synchronisable.cc  
+    ${NETWORK_SRC_FILES}
   )
-
   ADD_EXECUTABLE(networktest ${TEST_SRC_FILES})
   TARGET_LINK_LIBRARIES( networktest
@@ -62,128 +50,2 @@
   ##### end test for gamestate stuff #####
 ENDIF(NETWORK_TESTING_ENABLED)
-# build this if you want dummyserver4 and dummyclient4
-IF(NETWORKTRAFFIC_TESTING_ENABLED)
-  ##### test network traffic #####
-  SET( DUMMYSERVER4_SRC_FILES
-    ConnectionManager.cc
-    GameStateManager.cc
-    PacketBuffer.cc
-    PacketDecoder.cc
-    PacketGenerator.cc
-    ClientConnection.cc
-    ClientInformation.cc
-    GameStateClient.cc
-    Server.cc
-    Client.cc  
-    Synchronisable.cc
-    dummyserver4.cc
-  )
-
-  SET( DUMMYCLIENT4_SRC_FILES
-    ConnectionManager.cc
-    GameStateManager.cc
-    PacketBuffer.cc
-    PacketDecoder.cc
-    PacketGenerator.cc
-    ClientConnection.cc
-    ClientInformation.cc
-    GameStateClient.cc
-    Server.cc
-    Client.cc  
-    Synchronisable.cc
-    dummyclient4.cc
-  )
-
-  ADD_EXECUTABLE(dummyserver4 ${DUMMYSERVER4_SRC_FILES})
-  TARGET_LINK_LIBRARIES( dummyserver4
-    network
-    ${ENet_LIBRARY}
-    ${ZLIB_LIBRARY}
-    ${WINDOWS_ENET_DEPENDENCIES}
-    ${Boost_thread_LIBRARIES}
-    core
-    orxonoxs
-    audio
-  )
-
-  ADD_EXECUTABLE(dummyclient4 ${DUMMYCLIENT4_SRC_FILES})
-  TARGET_LINK_LIBRARIES( dummyclient4
-    network
-    ${ENet_LIBRARY}
-    ${ZLIB_LIBRARY}
-    ${WINDOWS_ENET_DEPENDENCIES}
-    ${Boost_thread_LIBRARIES}
-    core
-    orxonoxs
-    audio
-  )
-ENDIF(NETWORKTRAFFIC_TESTING_ENABLED)
-
-IF(BLABLA)
-  SET( CHATCLIENT_SRC_FILES
-    ClientConnection.cc
-    Client.cc
-    PacketBuffer.cc
-    PacketDecoder.cc
-    PacketGenerator.cc
-    dummyclient3.cc
-  )
-
-  SET( CHATSERVER_SRC_FILES
-    ConnectionManager.cc
-    GameStateManager.cc
-    PacketBuffer.cc
-    PacketDecoder.cc
-    PacketGenerator.cc
-    dummyserver3.cc
-  )
-
-  # chatserver for testing purposes
-  ADD_EXECUTABLE(chatserver ${CHATSERVER_SRC_FILES})
-  TARGET_LINK_LIBRARIES( chatserver
-    ${OGRE_LIBRARIES}
-    network
-    core
-    #objects
-    ${ENet_LIBRARY}
-    ${ZLIB_LIBRARY}
-    ${WINDOWS_ENET_DEPENDENCIES}
-  )
-
-  # chatclient for testing purpose
-  ADD_EXECUTABLE(chatclient ${CHATCLIENT_SRC_FILES})
-  TARGET_LINK_LIBRARIES( chatclient
-    ${OGRE_LIBRARIES}
-    network
-    core
-    #objects
-    ${ENet_LIBRARY}
-    ${ZLIB_LIBRARY}
-    ${WINDOWS_ENET_DEPENDENCIES}
-  )
-
-  # client for testing purpose
-  ADD_EXECUTABLE(client dummyclient2.cc)
-  TARGET_LINK_LIBRARIES( client
-    ${OGRE_LIBRARIES}
-    network
-    core
-    #objects
-    ${ENet_LIBRARY}
-    ${ZLIB_LIBRARY}
-    ${WINDOWS_ENET_DEPENDENCIES}
-  )
-
-  # server for testing purpose
-  ADD_EXECUTABLE(server dummyserver.cc)
-  TARGET_LINK_LIBRARIES( server
-    ${OGRE_LIBRARIES}
-    network
-    core
-    #objects
-    ${ENet_LIBRARY}
-    ${ZLIB_LIBRARY}
-    ${WINDOWS_ENET_DEPENDENCIES}
-  )
-ENDIF(BLABLA)
-
Index: /code/branches/network/src/network/Client.cc
===================================================================
--- /code/branches/network/src/network/Client.cc	(revision 1698)
+++ /code/branches/network/src/network/Client.cc	(revision 1699)
@@ -207,4 +207,9 @@
     return;
   }
+  
+  bool Client::ackGamestateID(int gamestateID, int clientID){
+    return true;
+    //TODO: maybe change this (not needed at the moment)
+  }
 
 //   void Client::processChat( chat *data, int clientId){
Index: /code/branches/network/src/network/Client.h
===================================================================
--- /code/branches/network/src/network/Client.h	(revision 1698)
+++ /code/branches/network/src/network/Client.h	(revision 1699)
@@ -79,5 +79,5 @@
 //    static void Chat( std::string message );
     
-    int shipID(){return shipID_;}
+    unsigned int shipID(){return shipID_;}
     int playerID(){return clientID_;}
 
@@ -97,4 +97,5 @@
     void processGamestate( GameStateCompressed *data, int clientID);
     void processClassid(classid *clid);
+    bool ackGamestateID(int gamestateID, int clientID);
 //     void processChat( chat *data, int clientId );
     bool processWelcome( welcome *w );
Index: /code/branches/network/src/network/ClientInformation.h
===================================================================
--- /code/branches/network/src/network/ClientInformation.h	(revision 1698)
+++ /code/branches/network/src/network/ClientInformation.h	(revision 1699)
@@ -72,8 +72,8 @@
     bool setGameStateID(int id);
     bool setPartialGamestateID(int id);
-    inline void setShipID(int id){ShipID_=id;}
+    inline void setShipID(unsigned int id){ShipID_=id;}
     
     // get functions
-    inline int getShipID(){return ShipID_;}
+    inline unsigned int getShipID(){return ShipID_;}
     int getID();
     int getGamestateID();
@@ -112,5 +112,5 @@
     int gamestateID_;
     int partialGamestateID_;
-    int ShipID_;   // this is the unique objectID
+    unsigned int ShipID_;   // this is the unique objectID
     bool synched_;
     unsigned short failures_;
Index: /code/branches/network/src/network/ConnectionManager.cc
===================================================================
--- /code/branches/network/src/network/ConnectionManager.cc	(revision 1698)
+++ /code/branches/network/src/network/ConnectionManager.cc	(revision 1699)
@@ -360,5 +360,5 @@
   
   bool ConnectionManager::removeShip(ClientInformation *client){
-    int id=client->getShipID();
+    unsigned int id=client->getShipID();
     orxonox::Iterator<orxonox::SpaceShip> it;
     for(it = orxonox::ObjectList<orxonox::SpaceShip>::start(); it; ++it){
Index: /code/branches/network/src/network/GameStateClient.cc
===================================================================
--- /code/branches/network/src/network/GameStateClient.cc	(revision 1698)
+++ /code/branches/network/src/network/GameStateClient.cc	(revision 1699)
@@ -34,5 +34,5 @@
 #include "core/BaseObject.h"
 #include "Synchronisable.h"
-
+#include "packet/Gamestate.h"
 
 namespace network
@@ -125,4 +125,13 @@
       if(b)
         loadShipCache();
+      packet::Gamestate *g = new packet::Gamestate();
+      if(!g->collectData(1, 0x1))
+        COUT(3) << "problem testing data collecting" << std::endl;
+      else
+      {
+        if(!g->spreadData(0x1))
+          COUT(3) << "problem testing data spreading" << std::endl;
+        delete g;
+      }
       return id;
     }
Index: /code/branches/network/src/network/Host.cc
===================================================================
--- /code/branches/network/src/network/Host.cc	(revision 1698)
+++ /code/branches/network/src/network/Host.cc	(revision 1699)
@@ -31,5 +31,5 @@
   if(!instance_)
     return false;
-  packet::Chat *c = new packet::Chat(message);
+  packet::Chat *c = new packet::Chat(message, getPlayerID());
   return instance_->sendChat(c);
 }
@@ -48,5 +48,5 @@
 }
 
-int Host::getShipID(){ 
+unsigned int Host::getShipID(){ 
   if(!instance_)
     return 0;
@@ -54,3 +54,7 @@
 }
 
+bool Host::ackGamestate(int gamestateID, int clientID){
+  return instance_->ackGamestateID(gamestateID, clientID);
+}
+
 }//namespace network
Index: /code/branches/network/src/network/Host.h
===================================================================
--- /code/branches/network/src/network/Host.h	(revision 1698)
+++ /code/branches/network/src/network/Host.h	(revision 1699)
@@ -44,5 +44,6 @@
     virtual bool sendChat(packet::Chat *chat)=0;
     virtual bool queuePacket(ENetPacket *packet, int clientID)=0;
-    virtual int shipID()=0;
+    virtual bool ackGamestateID(int gamestateID, int clientID)=0;
+    virtual unsigned int shipID()=0;
     virtual int playerID()=0;
     
@@ -60,5 +61,6 @@
     static bool receiveChat(packet::Chat *message, unsigned int clientID);
     static int getPlayerID();
-    static int getShipID();
+    static unsigned int getShipID();
+    static bool ackGamestate(int gamestateID, int clientID);
 };
 
Index: /code/branches/network/src/network/Server.cc
===================================================================
--- /code/branches/network/src/network/Server.cc	(revision 1698)
+++ /code/branches/network/src/network/Server.cc	(revision 1699)
@@ -302,4 +302,9 @@
   }
   
+  bool Server::ackGamestateID(int gamestateID, int clientID){
+    gamestates->ackGameState(clientID, gamestateID);
+    return true;
+  }
+  
   void Server::processGamestate( GameStateCompressed *data, int clientID){
     COUT(4) << "processing partial gamestate from client " << clientID << std::endl;
Index: /code/branches/network/src/network/Server.h
===================================================================
--- /code/branches/network/src/network/Server.h	(revision 1698)
+++ /code/branches/network/src/network/Server.h	(revision 1699)
@@ -76,5 +76,5 @@
     void updateGamestate();
   private:
-    int shipID(){return 0;}
+    unsigned int shipID(){return 0;}
     int playerID(){return 0;}
     
@@ -89,4 +89,7 @@
     bool processConnectRequest( connectRequest *con, int clientID );
     void processGamestate( GameStateCompressed *data, int clientID);
+    
+    bool ackGamestateID(int gamestateID, int clientID);
+    
     //void processChat( chat *data, int clientId);
     ConnectionManager *connection;
Index: /code/branches/network/src/network/Synchronisable.cc
===================================================================
--- /code/branches/network/src/network/Synchronisable.cc	(revision 1698)
+++ /code/branches/network/src/network/Synchronisable.cc	(revision 1699)
@@ -43,6 +43,8 @@
 #include <string>
 #include <iostream>
+#include <assert.h>
 
 #include "core/CoreIncludes.h"
+#include "core/BaseObject.h"
 // #include "core/Identifier.h"
 
@@ -84,4 +86,36 @@
     else  // server
       state_=0x1;
+  }
+  
+  bool Synchronisable::fabricate(unsigned char*& mem, int mode)
+  {
+    int size, objectID, classID;
+    size = *(int *)mem;
+    objectID = *(int*)(mem+sizeof(int));
+    classID = *(int*)(mem+2*sizeof(int));
+    
+    orxonox::Identifier* id = ID((unsigned int)classID);
+    if(!id){
+      COUT(3) << "We could not identify a new object; classid: " << classID << " uint: " << (unsigned int)classID << " objectID: " << objectID << " size: " << size << std::endl;
+      return false; // most probably the gamestate is corrupted
+    }
+    Synchronisable *no = dynamic_cast<Synchronisable *>(id->fabricate());
+    if(!no){
+      COUT(2) << "coudl not frabricate classid: " << classID << " objectID: " << objectID << " identifier: " << id << std::endl;
+      return false;
+    }
+    no->objectID=objectID;
+    no->classID=classID;
+          // update data and create object/entity...
+    if( !no->updateData(mem, mode) ){
+      COUT(1) << "We couldn't update the object: " << objectID << std::endl;
+      return false;
+    }
+    if( !no->create() )
+    {
+      COUT(1) << "We couldn't manifest (create() ) the object: " << objectID << std::endl;
+      return false;
+    }
+    return true;
   }
 
@@ -108,49 +142,5 @@
   }
 
-  /**
-  * note: only use this function for debug use, because it's inefficient (in order to produce a gamestate, you have to copy the whole data again to another memory location after this process)
-  * This function takes all SynchronisableVariables out of the Synchronisable and saves it into a syncData struct
-  * structure of the bitstream:
-  * (var1_size,var1,var2_size,var2,...)
-  * varx_size: size = sizeof(int)
-  * varx: size = varx_size
-  * @return data containing all variables and their sizes
-  */
-  // syncData Synchronisable::getData(){
-  //   std::list<synchronisableVariable>::iterator i;
-  //   int totalsize=0;
-  //   //figure out size of data to be allocated
-  //   for(i=syncList->begin(); i!=syncList->end(); i++){
-  //     // increase size (size of variable and size of size of variable ;)
-  //     if(i->type == STRING)
-  //       totalsize+=sizeof(int)+((std::string *)i->var)->length()+1;
-  //     else
-  //       totalsize+=sizeof(int)+i->size;
-  //   }
-  //   syncData retVal;
-  //   retVal.objectID=this->objectID;
-  //   retVal.classID=this->classID;
-  //   retVal.length=totalsize;
-  //   // allocate memory
-  //   retVal.data = (unsigned char *)malloc(totalsize);
-  //   // copy to location
-  //   //CHANGED: REMOVED DECLARATION int n=0 FROM LOOP
-  //   int n=0;
-  //   for(i=syncList->begin(); n<totalsize && i!=syncList->end(); i++){
-  //     std::memcpy(retVal.data+n, (const void*)(i->size), sizeof(int));
-  //     n+=sizeof(int);
-  //     switch(i->type){
-  //     case STRING:
-  //       std::memcpy(retVal.data+n, (const void *)(((std::string *)i->var)->c_str()), ((std::string *)i->var)->length()+1);
-  //       n+=((std::string *)i->var)->length()+1;
-  //       break;
-  //     case DATA:
-  //       std::memcpy(retVal.data+n, ((const void*)i->var), i->size);
-  //       n+=i->size;
-  //       break;
-  //     }
-  //   }
-  //   return retVal;
-  // }
+
   /**
   * This function takes all SynchronisableVariables out of the Synchronisable and saves it into a syncData struct
@@ -202,5 +192,106 @@
     return retVal;
   }
-
+  
+  /**
+   * This function takes all SynchronisableVariables out of the Synchronisable and saves it into a syncData struct
+  * Difference to the above function:
+   * takes a pointer to already allocated memory (must have at least getSize bytes length)
+  * structure of the bitstream:
+   * (var1_size,var1,var2_size,var2,...)
+   * varx_size: size = sizeof(int)
+   * varx: size = varx_size
+   * @return data containing all variables and their sizes
+   */
+  bool Synchronisable::getData2(unsigned char*& mem, int mode){
+    //std::cout << "inside getData" << std::endl;
+    unsigned int tempsize = 0;
+    if(mode==0x0)
+      mode=state_;
+    if(classID==0)
+      COUT(3) << "classid 0 " << this->getIdentifier()->getName() << std::endl;
+    this->classID=this->getIdentifier()->getNetworkID();
+    std::list<synchronisableVariable *>::iterator i;
+    unsigned int size;
+    size=getSize2(mode);
+    
+    // start copy header
+    memcpy(mem, &size, sizeof(unsigned int));
+    mem+=sizeof(unsigned int);
+    memcpy(mem, &(this->objectID), sizeof(unsigned int));
+    mem+=sizeof(unsigned int);
+    memcpy(mem, &(this->classID), sizeof(unsigned int));
+    mem+=sizeof(unsigned int);
+    tempsize+=12;
+    // end copy header
+    
+    
+    COUT(5) << "Synchronisable getting data from objectID: " << objectID << " classID: " << classID << " length: " << size << std::endl;
+    // copy to location
+    for(i=syncList->begin(); i!=syncList->end(); ++i){
+      //(std::memcpy(retVal.data+n, (const void*)(&(i->size)), sizeof(int));
+      if( ((*i)->mode & mode) == 0 ){
+        COUT(5) << "not getting data: " << std::endl;
+        continue;  // this variable should only be received
+      }
+      switch((*i)->type){
+        case DATA:
+          memcpy( (void *)(mem), (void*)((*i)->var), (*i)->size);
+          mem+=(*i)->size;
+          tempsize+=(*i)->size;
+          break;
+        case STRING:
+          memcpy( (void *)(mem), (void *)&((*i)->size), sizeof(int) );
+          mem+=sizeof(int);
+          const char *data = ( ( *(std::string *) (*i)->var).c_str());
+          memcpy( mem, (void*)data, (*i)->size);
+          COUT(5) << "synchronisable: char: " << (const char *)(mem) << " data: " << data << " string: " << *(std::string *)((*i)->var) << std::endl;
+          mem+=(*i)->size;
+          tempsize+=(*i)->size + 4;
+          break;
+      }
+    }
+    assert(tempsize==size);
+    return true;
+  }
+
+  /*bool Synchronisable::getData(Bytestream& bs, int mode)
+  {
+    //std::cout << "inside getData" << std::endl;
+    if(mode==0x0)
+      mode=state_;
+    if(classID==0)
+      COUT(3) << "classid 0 " << this->getIdentifier()->getName() << std::endl;
+    this->classID=this->getIdentifier()->getNetworkID();
+    std::list<synchronisableVariable *>::iterator i;
+    bs << this->getSize();
+    bs << this->objectID;
+    bs << this->classID;
+    // copy to location
+    for(i=syncList->begin(); i!=syncList->end(); ++i){
+      if( ((*i)->mode & mode) == 0 ){
+        COUT(5) << "not getting data: " << std::endl;
+        continue;  // this variable should only be received
+      }
+      switch((*i)->type){
+        case DATA:
+          bs << *(*i)->var;
+          //std::memcpy( (void *)(retVal.data+n), (void*)((*i)->var), (*i)->size);
+          //n+=(*i)->size;
+          break;
+        case STRING:
+          bs << *(String *)((*i)->var);
+          //memcpy( (void *)(retVal.data+n), (void *)&((*i)->size), sizeof(int) );
+          //n+=sizeof(int);
+          //const char *data = ( ( *(std::string *) (*i)->var).c_str());
+          //std::memcpy( retVal.data+n, (void*)data, (*i)->size);
+          //COUT(5) << "synchronisable: char: " << (const char *)(retVal.data+n) << " data: " << data << " string: " << *(std::string *)((*i)->var) << std::endl;
+          //n+=(*i)->size;
+          break;
+      }
+    }
+    return true;
+  }*/
+
+  
   /**
   * This function takes a syncData struct and takes it to update the variables
@@ -246,5 +337,67 @@
       }
       // call the callback function, if defined
-      if(callback)
+      if(callback && (*i)->callback)
+        (*i)->callback->call();
+    }
+    return true;
+  }
+  
+  /**
+   * This function takes a syncData struct and takes it to update the variables
+   * @param vars data of the variables
+   * @return true/false
+   */
+  bool Synchronisable::updateData(unsigned char*& mem, int mode){
+    unsigned char *data = mem;
+    if(mode==0x0)
+      mode=state_;
+    std::list<synchronisableVariable *>::iterator i;
+    if(syncList->empty()){
+      COUT(4) << "Synchronisable::updateData syncList is empty" << std::endl;
+      return false;
+    }
+    
+    // start extract header
+    unsigned int objectID, classID, size;
+    size = *(int *)mem;
+    mem+=sizeof(size);
+    objectID = *(int *)mem;
+    mem+=sizeof(objectID);
+    classID = *(int *)mem;
+    mem+=sizeof(classID);
+    // stop extract header
+    assert(this->objectID==objectID);
+    assert(this->classID==classID);
+    
+    COUT(5) << "Synchronisable: objectID " << objectID << ", classID " << classID << " size: " << size << " synchronising data" << std::endl;
+    for(i=syncList->begin(); i!=syncList->end() && mem <= data+size; i++){
+      if( ((*i)->mode ^ mode) == 0 ){
+        COUT(5) << "synchronisable: not updating variable " << std::endl;
+        continue;  // this variable should only be set
+      }
+      COUT(5) << "Synchronisable: element size: " << (*i)->size << " type: " << (*i)->type << std::endl;
+      bool callback=false;
+      switch((*i)->type){
+        case DATA:
+          if((*i)->callback) // check whether this variable changed (but only if callback was set)
+            if(strncmp((char *)(*i)->var, (char *)mem, (*i)->size)!=0)
+              callback=true;
+          memcpy((void*)(*i)->var, mem, (*i)->size);
+          mem+=(*i)->size;
+          break;
+        case STRING:
+          (*i)->size = *(int *)mem;
+          COUT(5) << "string size: " << (*i)->size << std::endl;
+          mem+=sizeof(int);
+          if((*i)->callback) // check whether this string changed
+            if( *(std::string *)((*i)->var) != std::string((char *)mem) )
+              callback=true;
+          *((std::string *)((*i)->var)) = std::string((const char*)mem);
+          COUT(5) << "synchronisable: char: " << (const char*)mem << " string: " << std::string((const char*)mem) << std::endl;
+          mem += (*i)->size;
+          break;
+      }
+      // call the callback function, if defined
+      if(callback && (*i)->callback)
         (*i)->callback->call();
     }
@@ -279,4 +432,26 @@
   }
   
+  /**
+   * This function returns the total amount of bytes needed by getData to save the whole content of the variables
+   * @return amount of bytes
+   */
+  int Synchronisable::getSize2(int mode){
+    return 3*sizeof(unsigned int) + getSize( mode );
+  }
+  
+  bool Synchronisable::isMyData(unsigned char* mem)
+  {
+    unsigned int objectID, classID, size;
+    size = *(int *)mem;
+    mem+=sizeof(size);
+    objectID = *(int *)mem;
+    mem+=sizeof(objectID);
+    classID = *(int *)mem;
+    mem+=sizeof(classID);
+    
+    assert(classID == this->classID);
+    return (objectID == this->objectID);
+  }
+  
   void Synchronisable::setBacksync(bool sync){
     backsync_=sync;
Index: /code/branches/network/src/network/Synchronisable.h
===================================================================
--- /code/branches/network/src/network/Synchronisable.h	(revision 1698)
+++ /code/branches/network/src/network/Synchronisable.h	(revision 1699)
@@ -35,4 +35,5 @@
 #include "core/OrxonoxClass.h"
 #include "NetworkCallback.h"
+#include "util/Bytestream.h"
 
 namespace network
@@ -44,12 +45,12 @@
 
   struct syncData{
-    int length;
-    int objectID;
-    int classID;
+    unsigned int length;
+    unsigned int objectID;
+    unsigned int classID;
     unsigned char *data;
   };
 
   typedef struct synchronisableVariable{
-    int size;
+    unsigned int size;
     int mode; // this determines in which direction the variable gets synchronised
     void *var;
@@ -69,12 +70,17 @@
 
     virtual ~Synchronisable();
-    int objectID;
-    int classID;
+    unsigned int objectID;
+    unsigned int classID;
 
     void registerVar(void *var, int size, variableType t, int mode=1, NetworkCallbackBase *cb=0);
     //  syncData getData();
     syncData getData(unsigned char *mem, int mode=0x0);
+    bool getData2(unsigned char*& men, int mode=0x0);
+    //bool getData(Bytestream& bs, int mode=0x0);
     int getSize(int mode=0x0);
+    int getSize2(int mode=0x0);
     bool updateData(syncData vars, int mode=0x0);
+    bool updateData(unsigned char*& mem, int mode=0x0);
+    bool isMyData(unsigned char* mem);
     void setBacksync(bool sync);
     bool getBacksync();
@@ -82,4 +88,6 @@
     virtual bool create();
     static void setClient(bool b);
+    
+    static bool fabricate(unsigned char*& mem, int mode=0x0);
   protected:
     Synchronisable();
