Index: /code/branches/merge/CMakeLists.txt
===================================================================
--- /code/branches/merge/CMakeLists.txt	(revision 1277)
+++ /code/branches/merge/CMakeLists.txt	(revision 1278)
@@ -22,4 +22,5 @@
 
 OPTION(NETWORK_TESTING_ENABLED "Do you want to build network testing tools: i.e. chatclient chatserver and alike")
+OPTION(NETWORKTRAFFIC_TESTING_ENABLED "Do you want to build dummyserver4 and dummyclient4")
 
 
Index: /code/branches/merge/src/network/CMakeLists.txt
===================================================================
--- /code/branches/merge/src/network/CMakeLists.txt	(revision 1277)
+++ /code/branches/merge/src/network/CMakeLists.txt	(revision 1278)
@@ -55,4 +55,62 @@
   ##### 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
Index: /code/branches/merge/src/network/ConnectionManager.cc
===================================================================
--- /code/branches/merge/src/network/ConnectionManager.cc	(revision 1277)
+++ /code/branches/merge/src/network/ConnectionManager.cc	(revision 1278)
@@ -40,5 +40,4 @@
 #include <iostream>
 // boost.thread library for multithreading support
-#include <boost/thread/thread.hpp>
 #include <boost/bind.hpp>
 
@@ -63,9 +62,9 @@
 namespace network
 {
-  boost::thread_group network_threads;
-  
-  ConnectionManager::ConnectionManager(){}
-  
-  ConnectionManager::ConnectionManager(ClientInformation *head) {
+  //boost::thread_group network_threads;
+  
+  ConnectionManager::ConnectionManager():receiverThread_(0){}
+  
+  ConnectionManager::ConnectionManager(ClientInformation *head) : receiverThread_(0) {
     quit=false;
     bindAddress.host = ENET_HOST_ANY;
@@ -74,5 +73,5 @@
   }
 
-  ConnectionManager::ConnectionManager(int port, std::string address, ClientInformation *head) {
+  ConnectionManager::ConnectionManager(int port, std::string address, ClientInformation *head) :receiverThread_(0) {
     quit=false;
     enet_address_set_host (& bindAddress, address.c_str());
@@ -81,5 +80,5 @@
   }
 
-  ConnectionManager::ConnectionManager(int port, const char *address, ClientInformation *head) {
+  ConnectionManager::ConnectionManager(int port, const char *address, ClientInformation *head) : receiverThread_(0) {
     quit=false;
     enet_address_set_host (& bindAddress, address);
@@ -111,6 +110,7 @@
 
   void ConnectionManager::createListener() {
-    network_threads.create_thread(boost::bind(boost::mem_fn(&ConnectionManager::receiverThread), this));
-    //     boost::thread thr(boost::bind(boost::mem_fn(&ConnectionManager::receiverThread), this));
+    receiverThread_ = new boost::thread(boost::bind(&ConnectionManager::receiverThread, this));
+    //network_threads.create_thread(boost::bind(boost::mem_fn(&ConnectionManager::receiverThread), this));
+         //boost::thread thr(boost::bind(boost::mem_fn(&ConnectionManager::receiverThread), this));
     return;
   }
@@ -118,5 +118,6 @@
   bool ConnectionManager::quitListener() {
     quit=true;
-    network_threads.join_all();
+    //network_threads.join_all();
+    receiverThread_->join();
     return true;
   }
@@ -202,5 +203,5 @@
       }
 //       usleep(100);
-      //yield(); //TODO: find apropriate
+      receiverThread_->yield(); //TODO: find apropriate
     }
     disconnectClients();
Index: /code/branches/merge/src/network/ConnectionManager.h
===================================================================
--- /code/branches/merge/src/network/ConnectionManager.h	(revision 1277)
+++ /code/branches/merge/src/network/ConnectionManager.h	(revision 1278)
@@ -47,4 +47,5 @@
 // enet library for networking support
 #include <enet/enet.h>
+#include <boost/thread/thread.hpp>
 
 #include "PacketBuffer.h"
@@ -112,5 +113,5 @@
     ClientInformation *head_;
 
-    
+    boost::thread *receiverThread_;
 //     int getNumberOfClients();
     //functions to map what object every clients uses
Index: /code/branches/merge/src/network/dummyclient4.cc
===================================================================
--- /code/branches/merge/src/network/dummyclient4.cc	(revision 1278)
+++ /code/branches/merge/src/network/dummyclient4.cc	(revision 1278)
@@ -0,0 +1,29 @@
+#include <iostream>
+#include <string>
+#include <enet/enet.h>
+#include <network/PacketManager.h>
+#include <network/PacketTypes.h>
+#include <network/Client.h>
+#include "core/Tickable.h"
+#include "core/BaseObject.h"
+#include "Synchronisable.h"
+#include "core/CoreIncludes.h"
+#include "objects/SpaceShip.h"
+
+int main() {
+  std::cout << "dummyclient4" << std::endl;
+  network::Client* client;
+  client = network::Client::createSingleton( "127.0.0.1", 55556 );
+  if(client->establishConnection())
+    std::cout << "established connection" << std::endl;
+  else{
+    std::cout << "could not establish connection" << std::endl;
+    return -1;
+  }
+  if(client->closeConnection())
+    std::cout << "closed connection" << std::endl;
+  else
+    std::cout << "could not close connection" << std::endl;
+}
+
+
Index: /code/branches/merge/src/network/dummyserver4.cc
===================================================================
--- /code/branches/merge/src/network/dummyserver4.cc	(revision 1278)
+++ /code/branches/merge/src/network/dummyserver4.cc	(revision 1278)
@@ -0,0 +1,22 @@
+#include <iostream>
+#include <string>
+#include <enet/enet.h>
+#include <network/PacketManager.h>
+#include <network/PacketTypes.h>
+#include <network/Server.h>
+#include "core/Tickable.h"
+#include "core/BaseObject.h"
+#include "Synchronisable.h"
+#include "core/CoreIncludes.h"
+#include "objects/SpaceShip.h"
+#include "util/Sleep.h"
+
+int main() {
+  network::Server *server = new network::Server();
+  server->open();
+  while(true){
+    usleep( 1000 );
+  }
+  server->close();
+  return 0;
+}
Index: /code/branches/merge/src/orxonox/CMakeLists.txt
===================================================================
--- /code/branches/merge/src/orxonox/CMakeLists.txt	(revision 1277)
+++ /code/branches/merge/src/orxonox/CMakeLists.txt	(revision 1278)
@@ -43,4 +43,23 @@
 ADD_EXECUTABLE( orxonox ${ORXONOX_SRC_FILES} )
 
+IF(NETWORKTRAFFIC_TESTING_ENABLED)
+
+  SET( ORXONOXS_SRC_FILES
+    GraphicsEngine.cc
+    objects/Ambient.cc
+    objects/Camera.cc
+    objects/CameraHandler.cc
+    objects/Explosion.cc
+    objects/Model.cc
+    objects/NPC.cc
+    objects/Projectile.cc
+    objects/Skybox.cc
+    objects/SpaceShip.cc
+    objects/WorldEntity.cc
+  )
+
+  ADD_LIBRARY(orxonoxs SHARED ${ORXONOX_SRC_FILES})
+ENDIF(NETWORKTRAFFIC_TESTING_ENABLED)
+
 TARGET_LINK_LIBRARIES( orxonox
   ${OGRE_LIBRARIES}
Index: /code/branches/merge/src/orxonox/GraphicsEngine.cc
===================================================================
--- /code/branches/merge/src/orxonox/GraphicsEngine.cc	(revision 1277)
+++ /code/branches/merge/src/orxonox/GraphicsEngine.cc	(revision 1278)
@@ -9,6 +9,6 @@
  *   modify it under the terms of the GNU General Public License
  *   as published by the Free Software Foundation; either version 2
- *   of the License, or (at your option) any later version.
- *
+ *   of the License, or (atl your option) any later version.
+ *lo
  *   This program is distributed in the hope that it will be useful,
  *   but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -137,5 +137,5 @@
 #endif
 
-    // create a logManager
+/*    // create a logManager
     // note: If there's already a logManager, Ogre will complain by a failed assertation.
     // but that shouldn't happen, since this is the first time to create a logManager..
@@ -148,9 +148,9 @@
       myLog = logger->createLog("ogre.log", true, false, true);
     else
-      myLog = logger->createLog(this->ogreLogfile_, true, false, false);
+          myLog = logger->createLog(this->ogreLogfile_, true, false, false);
     CCOUT(4) << "Ogre Log created" << std::endl;
 
     myLog->setLogDetail(Ogre::LL_BOREME);
-    myLog->addListener(this);
+    myLog->addListener(this);*/
 
     // Root will detect that we've already created a Log
