Index: branches/proxy/src/lib/network/Makefile.am
===================================================================
--- branches/proxy/src/lib/network/Makefile.am	(revision 9274)
+++ branches/proxy/src/lib/network/Makefile.am	(revision 9275)
@@ -8,6 +8,6 @@
 		      shared_network_data.cc \
 		      network_socket.cc \
-		      connection_monitor.cc \
-		      network_monitor.cc \
+		      monitor/connection_monitor.cc \
+		      monitor/network_monitor.cc \
 		      network_stream.cc \
                       data_stream.cc \
@@ -44,6 +44,6 @@
                  shared_network_data.h \
                  network_socket.h \
-                 connection_monitor.h \
-                 network_monitor.h \
+                 monitor/connection_monitor.h \
+                 monitor/network_monitor.h \
 		 network_stream.h \
                  data_stream.h \
Index: branches/proxy/src/lib/network/connection_monitor.cc
===================================================================
--- branches/proxy/src/lib/network/connection_monitor.cc	(revision 9274)
+++ 	(revision )
@@ -1,257 +1,0 @@
-/*
-   orxonox - the future of 3D-vertical-scrollers
-
-   Copyright (C) 2004 orx
-
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 2, or (at your option)
-   any later version.
-
-### File Specific:
-   main-programmer: Christoph Renner
-   co-programmer: ...
-*/
-
-#include "connection_monitor.h"
-#include "network_log.h"
-
-#include <debug.h>
-#include <SDL/SDL.h>
-#include <string.h>
-
-/* using namespace std is default, this needs to be here */
-using namespace std;
-
-/**
- * constructor
- * @param userId user's id
- */
-ConnectionMonitor::ConnectionMonitor( int userId )
-{
-  /* set the class id for the base object and add ist to class list*/
-  this->setClassID(CL_CONNECTION_MONITOR, "ConnectionMonitor");
-  
-  this->userId = userId;
-  this->ping = 0;
-  this->incomingUnzippedBandWidth = 0;
-  this->outgoingUnzippedBandWidth = 0;
-  this->incomingZippedBandWidth = 0;
-  this->outgoingZippedBandWidth = 0;
-  this->nIncomingPackets = 0;
-  this->nOutgoingPackets = 0;
-  this->nZIncomingPackets = 0;
-  this->nZOutgoingPackets = 0;
-  
-  this->lastPacketTick = 0;
-  this->lastPrintTick = 0;
-}
-
-/**
- * deconstructor
- */
-ConnectionMonitor::~ConnectionMonitor( )
-{
-}
-
-/**
- * process unzipped outgoing packet
- * @param data pointer to packet data
- * @param length length of packet
- * @param stateId packet's state id
- */
-void ConnectionMonitor::processUnzippedOutgoingPacket( int tick, byte * data, int length, int stateId )
-{
-  nOutgoingPackets++;
-  
-  // for ping calculation
-  sentStateTicks[stateId] = tick;
-  
-  // calculate bandwidth
-  outgoingUnzippedPacketHistory[tick] = length;
-  outgoingUnzippedBandWidth = calculateBandWidth( outgoingUnzippedPacketHistory, tick );
-  
-  //NETPRINTF(n)("UNZIPPED UPSTREAM: user: %d bandwidth %f\n", userId, outgoingUnzippedBandWidth );
-  
-  // count zero bytes
-  //int nZeroBytes = 0;
-  
-  //for ( int i = 0; i < length; i++ )
-  //  if ( data[i] == '\0' )
-  //    nZeroBytes++;
-  
-  //NETPRINTF(n)( "ZEROBYTES: %d (%f%%)\n", nZeroBytes, ((float)100)*nZeroBytes/length );
-}
-
-/**
- * process unzipped incoming packet
- * @param data pointer to packet data
- * @param length length of packet
- * @param stateId packet's state id
- * @param ackedState state which was acked by this packet
- */
-void ConnectionMonitor::processUnzippedIncomingPacket( int tick, byte * data, int length, int stateId, int ackedState )
-{
-  nIncomingPackets++;
-  
-  lastPacketTick = tick;
-  
-  // calculate ping
-  if ( sentStateTicks.find( ackedState ) != sentStateTicks.end() )
-  {
-    ackDelay.push_back( tick - sentStateTicks[ackedState] );
-  }
-  
-  while ( sentStateTicks.begin() != sentStateTicks.end() && sentStateTicks.begin()->first <= ackedState )
-    sentStateTicks.erase( sentStateTicks.begin() );
-      
-  while ( ackDelay.size() > N_PACKETS_FOR_PING )
-    ackDelay.erase( ackDelay.begin() );
-      
-  ping = 0;
-      
-  for ( std::list<int>::iterator it = ackDelay.begin(); it != ackDelay.end(); it++ )
-    ping += *it;
-      
-  if ( ackDelay.size() == 0 )
-    ping = -1;
-  else
-    ping /= ackDelay.size();
-      
-  //NETPRINTF(n)("PING: user: %d ping: %d\n", userId, ping );
-  
-  // calculate bandwidth
-  incomingUnzippedPacketHistory[tick] = length;
-  incomingUnzippedBandWidth = calculateBandWidth( incomingUnzippedPacketHistory, tick );
-  
-  //NETPRINTF(n)("UNZIPPED DOWNSTREAM: user: %d bandwidth %f\n", userId, incomingUnzippedBandWidth );
-  
-}
-
-/**
- * remove old packets
- * @param packetHistory 
- * @param tick 
- */
-void ConnectionMonitor::removeOldPackets( std::map< int, int > & packetHistory, int tick )
-{
-  while ( packetHistory.begin()->first < tick - MSECS_TO_CALC_BWIDTH )
-    packetHistory.erase( packetHistory.begin() );
-}
-
-/**
- * calculate bandwidth out of packethistory
- * @param packetHistory packet history
- * @param tick current tick from SDL_GetTicks
- * @return bandwidth in bytes/sec
- */
-float ConnectionMonitor::calculateBandWidth( std::map< int, int > & packetHistory, int tick )
-{
-  removeOldPackets( packetHistory, tick );
-  
-  float res = 0.0f;
-#if 0
-  for ( std::map<int,int>::iterator it = packetHistory.begin(); it != packetHistory.end(); it++ )
-  {
-    if ( it != packetHistory.begin() )
-      res += it->second;
-  }
-  
-  if ( packetHistory.size() <= 1 || tick - packetHistory.begin()->first == 0 )
-    res = 0.0f;
-  else
-    res /= (float)(tick - packetHistory.begin()->first);
-  
-  res *= 1000.0f;
-#endif
-
-  for ( std::map<int,int>::iterator it = packetHistory.begin(); it != packetHistory.end(); it++ )
-  {
-    res += it->second;
-  }
-  
-  if ( packetHistory.size() <= 1 )
-    res = 0.0f;
-  else
-    res /= (float)(tick - packetHistory.begin()->first);
-  
-  res *= 1000.0f;
-
-  return res;
-}
-
-
-/**
- * process zipped outgoing packet
- * @param data pointer to packet data
- * @param length length of packet
- * @param stateId packet's state id
- */
-void ConnectionMonitor::processZippedOutgoingPacket( int tick, byte * data, int length, int stateId )
-{
-  nZOutgoingPackets++;
-  
-  // calculate bandwidth
-  outgoingZippedPacketHistory[tick] = length;
-  outgoingZippedBandWidth = calculateBandWidth( outgoingZippedPacketHistory, tick );
-  
-  //NETPRINTF(n)("UPSTREAM: user: %d bandwidth %f nOutgoingPackets %d\n", userId, outgoingZippedBandWidth, nOutgoingPackets );
-
-  if ( lastPrintTick < tick-1000 )
-  {
-    printStatis();
-    lastPrintTick = tick;
-  }
-}
-
-
-/**
- * process zipped incoming packet
- * @param data pointer to packet data
- * @param length length of packet
- * @param stateId packet's state id
- * @param ackedState state which was acked by this packet
- */
-void ConnectionMonitor::processZippedIncomingPacket( int tick, byte * data, int length )
-{
-  nZIncomingPackets++;
-  
-  // calculate bandwidth
-  incomingZippedPacketHistory[tick] = length;
-  incomingZippedBandWidth = calculateBandWidth( incomingZippedPacketHistory, tick );
-  
-  //NETPRINTF(n)("DOWNSTREAM: user: %d bandwidth %f nIncomingPackets %d\n", userId, incomingZippedBandWidth, nIncomingPackets );
-  
-}
-
-
-/**
- * check if client sent no packets for SECS_TO_TIMEOUT
- * @return true if last packet recieved \< NOW() - SECS_TO_TIMEOUT
- */
-bool ConnectionMonitor::hasTimedOut( )
-{
-  if ( lastPacketTick + SECS_TO_TIMEOUT*1000 < SDL_GetTicks() && nIncomingPackets > 0 )
-    return true;
-  
-  if ( nIncomingPackets == 0 && nOutgoingPackets >= NETWORK_FREQUENCY*SECS_TO_TIMEOUT )
-    return true;
-  
-  return false;
-}
-
-
-
-/**
- * prints bandwith usage, ping and other important things to telnet-console
- */
-void ConnectionMonitor::printStatis( )
-{
-  NETPRINT(n)("============NETWORKSTATS FOR USER %d============\n", userId);
-  NETPRINT(n)("PING = %d\n", ping );
-  NETPRINT(n)("BANDWIDTH: UP: %f (%f) DOWN %f (%f)\n", outgoingZippedBandWidth, outgoingUnzippedBandWidth, incomingZippedBandWidth, incomingUnzippedBandWidth);
-  NETPRINT(n)("PACKETS: RECIEVED %d; SENT %d\n", nIncomingPackets, nOutgoingPackets );
-  NETPRINT(n)("================================================\n");
-}
-
-
Index: branches/proxy/src/lib/network/connection_monitor.h
===================================================================
--- branches/proxy/src/lib/network/connection_monitor.h	(revision 9274)
+++ 	(revision )
@@ -1,71 +1,0 @@
-/*!
- * @file connection_monitor.h
-    \brief provides information about the quality of a connection.
- */
-
-#ifndef _CONNECTION_MONITOR_H
-#define _CONNECTION_MONITOR_H
-
-#include "base_object.h"
-#include "netdefs.h"
-
-#include <map>
-#include <list>
-
-#define N_PACKETS_FOR_PING 20
-#define MSECS_TO_CALC_BWIDTH 1000
-#define SECS_TO_TIMEOUT 30
-
-class ConnectionMonitor : virtual public BaseObject
-{
-  public:
-    ConnectionMonitor( int userId );
-    virtual ~ConnectionMonitor();
-
-    void processUnzippedOutgoingPacket( int tick, byte * data, int length, int stateId );
-    void processUnzippedIncomingPacket( int tick, byte * data, int length, int stateId, int ackedState );
-
-    void processZippedOutgoingPacket( int tick, byte * data, int length, int stateId );
-    void processZippedIncomingPacket( int tick, byte * data, int length );
-
-    void calculatePing();
-
-    bool hasTimedOut();
-
-    void printStatis();
-
-  private:
-    float calculateBandWidth( std::map<int,int> & packetHistory, int tick );
-    void removeOldPackets( std::map<int,int> & packetHistory, int tick );
-
-    int userId;       //!< user's id
-
-    std::map<int,int>   sentStateTicks;
-
-    std::map<int,int>   incomingUnzippedPacketHistory;
-    std::map<int,int>   outgoingUnzippedPacketHistory;
-
-    std::map<int,int>   incomingZippedPacketHistory;
-    std::map<int,int>   outgoingZippedPacketHistory;
-
-    std::list<int>      ackDelay;
-    int                 ping;
-
-    float               incomingUnzippedBandWidth;
-    float               outgoingUnzippedBandWidth;
-
-    float               incomingZippedBandWidth;
-    float               outgoingZippedBandWidth;
-
-    int                 nIncomingPackets;
-    int                 nOutgoingPackets;
-
-    int                 nZIncomingPackets;
-    int                 nZOutgoingPackets;
-
-    int                 lastPacketTick;
-
-    int                 lastPrintTick;
-  };
-
-#endif
Index: branches/proxy/src/lib/network/monitor/connection_monitor.cc
===================================================================
--- branches/proxy/src/lib/network/monitor/connection_monitor.cc	(revision 9275)
+++ branches/proxy/src/lib/network/monitor/connection_monitor.cc	(revision 9275)
@@ -0,0 +1,257 @@
+/*
+   orxonox - the future of 3D-vertical-scrollers
+
+   Copyright (C) 2004 orx
+
+   This program is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 2, or (at your option)
+   any later version.
+
+### File Specific:
+   main-programmer: Christoph Renner
+   co-programmer: ...
+*/
+
+#include "connection_monitor.h"
+#include "network_log.h"
+
+#include <debug.h>
+#include <SDL/SDL.h>
+#include <string.h>
+
+/* using namespace std is default, this needs to be here */
+using namespace std;
+
+/**
+ * constructor
+ * @param userId user's id
+ */
+ConnectionMonitor::ConnectionMonitor( int userId )
+{
+  /* set the class id for the base object and add ist to class list*/
+  this->setClassID(CL_CONNECTION_MONITOR, "ConnectionMonitor");
+  
+  this->userId = userId;
+  this->ping = 0;
+  this->incomingUnzippedBandWidth = 0;
+  this->outgoingUnzippedBandWidth = 0;
+  this->incomingZippedBandWidth = 0;
+  this->outgoingZippedBandWidth = 0;
+  this->nIncomingPackets = 0;
+  this->nOutgoingPackets = 0;
+  this->nZIncomingPackets = 0;
+  this->nZOutgoingPackets = 0;
+  
+  this->lastPacketTick = 0;
+  this->lastPrintTick = 0;
+}
+
+/**
+ * deconstructor
+ */
+ConnectionMonitor::~ConnectionMonitor( )
+{
+}
+
+/**
+ * process unzipped outgoing packet
+ * @param data pointer to packet data
+ * @param length length of packet
+ * @param stateId packet's state id
+ */
+void ConnectionMonitor::processUnzippedOutgoingPacket( int tick, byte * data, int length, int stateId )
+{
+  nOutgoingPackets++;
+  
+  // for ping calculation
+  sentStateTicks[stateId] = tick;
+  
+  // calculate bandwidth
+  outgoingUnzippedPacketHistory[tick] = length;
+  outgoingUnzippedBandWidth = calculateBandWidth( outgoingUnzippedPacketHistory, tick );
+  
+  //NETPRINTF(n)("UNZIPPED UPSTREAM: user: %d bandwidth %f\n", userId, outgoingUnzippedBandWidth );
+  
+  // count zero bytes
+  //int nZeroBytes = 0;
+  
+  //for ( int i = 0; i < length; i++ )
+  //  if ( data[i] == '\0' )
+  //    nZeroBytes++;
+  
+  //NETPRINTF(n)( "ZEROBYTES: %d (%f%%)\n", nZeroBytes, ((float)100)*nZeroBytes/length );
+}
+
+/**
+ * process unzipped incoming packet
+ * @param data pointer to packet data
+ * @param length length of packet
+ * @param stateId packet's state id
+ * @param ackedState state which was acked by this packet
+ */
+void ConnectionMonitor::processUnzippedIncomingPacket( int tick, byte * data, int length, int stateId, int ackedState )
+{
+  nIncomingPackets++;
+  
+  lastPacketTick = tick;
+  
+  // calculate ping
+  if ( sentStateTicks.find( ackedState ) != sentStateTicks.end() )
+  {
+    ackDelay.push_back( tick - sentStateTicks[ackedState] );
+  }
+  
+  while ( sentStateTicks.begin() != sentStateTicks.end() && sentStateTicks.begin()->first <= ackedState )
+    sentStateTicks.erase( sentStateTicks.begin() );
+      
+  while ( ackDelay.size() > N_PACKETS_FOR_PING )
+    ackDelay.erase( ackDelay.begin() );
+      
+  ping = 0;
+      
+  for ( std::list<int>::iterator it = ackDelay.begin(); it != ackDelay.end(); it++ )
+    ping += *it;
+      
+  if ( ackDelay.size() == 0 )
+    ping = -1;
+  else
+    ping /= ackDelay.size();
+      
+  //NETPRINTF(n)("PING: user: %d ping: %d\n", userId, ping );
+  
+  // calculate bandwidth
+  incomingUnzippedPacketHistory[tick] = length;
+  incomingUnzippedBandWidth = calculateBandWidth( incomingUnzippedPacketHistory, tick );
+  
+  //NETPRINTF(n)("UNZIPPED DOWNSTREAM: user: %d bandwidth %f\n", userId, incomingUnzippedBandWidth );
+  
+}
+
+/**
+ * remove old packets
+ * @param packetHistory 
+ * @param tick 
+ */
+void ConnectionMonitor::removeOldPackets( std::map< int, int > & packetHistory, int tick )
+{
+  while ( packetHistory.begin()->first < tick - MSECS_TO_CALC_BWIDTH )
+    packetHistory.erase( packetHistory.begin() );
+}
+
+/**
+ * calculate bandwidth out of packethistory
+ * @param packetHistory packet history
+ * @param tick current tick from SDL_GetTicks
+ * @return bandwidth in bytes/sec
+ */
+float ConnectionMonitor::calculateBandWidth( std::map< int, int > & packetHistory, int tick )
+{
+  removeOldPackets( packetHistory, tick );
+  
+  float res = 0.0f;
+#if 0
+  for ( std::map<int,int>::iterator it = packetHistory.begin(); it != packetHistory.end(); it++ )
+  {
+    if ( it != packetHistory.begin() )
+      res += it->second;
+  }
+  
+  if ( packetHistory.size() <= 1 || tick - packetHistory.begin()->first == 0 )
+    res = 0.0f;
+  else
+    res /= (float)(tick - packetHistory.begin()->first);
+  
+  res *= 1000.0f;
+#endif
+
+  for ( std::map<int,int>::iterator it = packetHistory.begin(); it != packetHistory.end(); it++ )
+  {
+    res += it->second;
+  }
+  
+  if ( packetHistory.size() <= 1 )
+    res = 0.0f;
+  else
+    res /= (float)(tick - packetHistory.begin()->first);
+  
+  res *= 1000.0f;
+
+  return res;
+}
+
+
+/**
+ * process zipped outgoing packet
+ * @param data pointer to packet data
+ * @param length length of packet
+ * @param stateId packet's state id
+ */
+void ConnectionMonitor::processZippedOutgoingPacket( int tick, byte * data, int length, int stateId )
+{
+  nZOutgoingPackets++;
+  
+  // calculate bandwidth
+  outgoingZippedPacketHistory[tick] = length;
+  outgoingZippedBandWidth = calculateBandWidth( outgoingZippedPacketHistory, tick );
+  
+  //NETPRINTF(n)("UPSTREAM: user: %d bandwidth %f nOutgoingPackets %d\n", userId, outgoingZippedBandWidth, nOutgoingPackets );
+
+  if ( lastPrintTick < tick-1000 )
+  {
+    printStatis();
+    lastPrintTick = tick;
+  }
+}
+
+
+/**
+ * process zipped incoming packet
+ * @param data pointer to packet data
+ * @param length length of packet
+ * @param stateId packet's state id
+ * @param ackedState state which was acked by this packet
+ */
+void ConnectionMonitor::processZippedIncomingPacket( int tick, byte * data, int length )
+{
+  nZIncomingPackets++;
+  
+  // calculate bandwidth
+  incomingZippedPacketHistory[tick] = length;
+  incomingZippedBandWidth = calculateBandWidth( incomingZippedPacketHistory, tick );
+  
+  //NETPRINTF(n)("DOWNSTREAM: user: %d bandwidth %f nIncomingPackets %d\n", userId, incomingZippedBandWidth, nIncomingPackets );
+  
+}
+
+
+/**
+ * check if client sent no packets for SECS_TO_TIMEOUT
+ * @return true if last packet recieved \< NOW() - SECS_TO_TIMEOUT
+ */
+bool ConnectionMonitor::hasTimedOut( )
+{
+  if ( lastPacketTick + SECS_TO_TIMEOUT*1000 < SDL_GetTicks() && nIncomingPackets > 0 )
+    return true;
+  
+  if ( nIncomingPackets == 0 && nOutgoingPackets >= NETWORK_FREQUENCY*SECS_TO_TIMEOUT )
+    return true;
+  
+  return false;
+}
+
+
+
+/**
+ * prints bandwith usage, ping and other important things to telnet-console
+ */
+void ConnectionMonitor::printStatis( )
+{
+  NETPRINT(n)("============NETWORKSTATS FOR USER %d============\n", userId);
+  NETPRINT(n)("PING = %d\n", ping );
+  NETPRINT(n)("BANDWIDTH: UP: %f (%f) DOWN %f (%f)\n", outgoingZippedBandWidth, outgoingUnzippedBandWidth, incomingZippedBandWidth, incomingUnzippedBandWidth);
+  NETPRINT(n)("PACKETS: RECIEVED %d; SENT %d\n", nIncomingPackets, nOutgoingPackets );
+  NETPRINT(n)("================================================\n");
+}
+
+
Index: branches/proxy/src/lib/network/monitor/connection_monitor.h
===================================================================
--- branches/proxy/src/lib/network/monitor/connection_monitor.h	(revision 9275)
+++ branches/proxy/src/lib/network/monitor/connection_monitor.h	(revision 9275)
@@ -0,0 +1,71 @@
+/*!
+ * @file connection_monitor.h
+    \brief provides information about the quality of a connection.
+ */
+
+#ifndef _CONNECTION_MONITOR_H
+#define _CONNECTION_MONITOR_H
+
+#include "base_object.h"
+#include "netdefs.h"
+
+#include <map>
+#include <list>
+
+#define N_PACKETS_FOR_PING 20
+#define MSECS_TO_CALC_BWIDTH 1000
+#define SECS_TO_TIMEOUT 30
+
+class ConnectionMonitor : virtual public BaseObject
+{
+  public:
+    ConnectionMonitor( int userId );
+    virtual ~ConnectionMonitor();
+
+    void processUnzippedOutgoingPacket( int tick, byte * data, int length, int stateId );
+    void processUnzippedIncomingPacket( int tick, byte * data, int length, int stateId, int ackedState );
+
+    void processZippedOutgoingPacket( int tick, byte * data, int length, int stateId );
+    void processZippedIncomingPacket( int tick, byte * data, int length );
+
+    void calculatePing();
+
+    bool hasTimedOut();
+
+    void printStatis();
+
+  private:
+    float calculateBandWidth( std::map<int,int> & packetHistory, int tick );
+    void removeOldPackets( std::map<int,int> & packetHistory, int tick );
+
+    int userId;       //!< user's id
+
+    std::map<int,int>   sentStateTicks;
+
+    std::map<int,int>   incomingUnzippedPacketHistory;
+    std::map<int,int>   outgoingUnzippedPacketHistory;
+
+    std::map<int,int>   incomingZippedPacketHistory;
+    std::map<int,int>   outgoingZippedPacketHistory;
+
+    std::list<int>      ackDelay;
+    int                 ping;
+
+    float               incomingUnzippedBandWidth;
+    float               outgoingUnzippedBandWidth;
+
+    float               incomingZippedBandWidth;
+    float               outgoingZippedBandWidth;
+
+    int                 nIncomingPackets;
+    int                 nOutgoingPackets;
+
+    int                 nZIncomingPackets;
+    int                 nZOutgoingPackets;
+
+    int                 lastPacketTick;
+
+    int                 lastPrintTick;
+  };
+
+#endif
Index: branches/proxy/src/lib/network/monitor/network_monitor.cc
===================================================================
--- branches/proxy/src/lib/network/monitor/network_monitor.cc	(revision 9275)
+++ branches/proxy/src/lib/network/monitor/network_monitor.cc	(revision 9275)
@@ -0,0 +1,180 @@
+/*
+   orxonox - the future of 3D-vertical-scrollers
+
+   Copyright (C) 2004 orx
+
+   This program is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 2, or (at your option)
+   any later version.
+
+### File Specific:
+   main-programmer: Patrick Boenzli
+*/
+
+#include "glgui.h"
+#include "shell_command.h"
+
+#include "network_stream.h"
+#include "debug.h"
+
+#include "network_monitor.h"
+
+SHELL_COMMAND(showGUI, NetworkMonitor, showGUI);
+SHELL_COMMAND(hideGUI, NetworkMonitor, hideGUI);
+// SHELL_COMMAND(output, MappedWater, saveParams);
+
+
+
+/**
+ * starts a network monitor
+ */
+NetworkMonitor::NetworkMonitor(NetworkStream* networkStream)
+{
+  this->playerNumber = 0;
+}
+
+
+/**
+ * deconstructor
+ */
+NetworkMonitor::~NetworkMonitor()
+{}
+
+
+/**
+ * adds a client
+ */
+void NetworkMonitor::addClient(PeerInfo* node)
+{
+  this->clientList.push_back(node);
+  this->playerNumber++;
+}
+
+/**
+ * adds a proxy server
+ */
+void NetworkMonitor::addProxyServer(PeerInfo* node)
+{
+  this->proxyServerList.push_back(node);
+  this->playerNumber++;
+}
+
+/**
+ * adds a master server
+ */
+void NetworkMonitor::addMasterServer(PeerInfo* node)
+{
+  this->masterServerList.push_back(node);
+  this->playerNumber++;
+}
+
+/**
+ * removes a client
+ */
+void NetworkMonitor::removeClient(PeerInfo* node)
+{
+  std::list<PeerInfo*>::iterator it = this->clientList.begin();
+  for(; it != this->clientList.end(); it++)
+  {
+    if( *it == node)
+    {
+      this->clientList.erase(it);
+      this->playerNumber--;
+      return;
+    }
+  }
+
+  PRINTF(2)("Could not remove client from the list, very strange...");
+}
+
+/**
+ * removes a proxy server
+ */
+void NetworkMonitor::removeProxyServer(PeerInfo* node)
+{
+  std::list<PeerInfo*>::iterator it = this->proxyServerList.begin();
+  for(; it != this->proxyServerList.end(); it++)
+  {
+    if( *it == node)
+    {
+      this->proxyServerList.erase(it);
+      this->playerNumber--;
+      return;
+    }
+  }
+
+  PRINTF(2)("Could not remove proxy server from the list, very strange...");
+}
+
+/**
+ * removes a master server
+ */
+void NetworkMonitor::removeMasterServer(PeerInfo* node)
+{
+  std::list<PeerInfo*>::iterator it = this->masterServerList.begin();
+  for(; it != this->masterServerList.end(); it++)
+  {
+    if( *it == node)
+    {
+      this->masterServerList.erase(it);
+      this->playerNumber--;
+      return;
+    }
+  }
+
+  PRINTF(2)("Could not remove client from the list, very strange...");
+}
+
+
+
+/**
+ * this displays the network monitor gui
+ */
+void NetworkMonitor::showGUI()
+{
+  if (this->box == NULL)
+  {
+    this->box = new OrxGui::GLGuiBox(OrxGui::Vertical);
+    {
+      OrxGui::GLGuiBox* waterColorBox = new OrxGui::GLGuiBox(OrxGui::Horizontal);
+      {
+        OrxGui::GLGuiText* waterColorText = new OrxGui::GLGuiText();
+        waterColorText->setText("NetworkMonitor");
+        waterColorBox->pack(waterColorText);
+      }
+      this->box->pack(waterColorBox);
+    }
+
+    this->box->showAll();
+    this->box->setAbsCoor2D(300, 40);
+    OrxGui::GLGuiHandler::getInstance()->activate();
+//     OrxGui::GLGuiHandler::getInstance()->activateCursor();
+  }
+}
+
+
+/**
+ * hides the network monitor gui again
+ */
+void NetworkMonitor::hideGUI()
+{
+  if( this->box == NULL)
+    return;
+
+  OrxGui::GLGuiHandler::getInstance()->deactivate();
+//   OrxGui::GLGuiHandler::getInstance()->deactivateCursor();
+
+  delete this->box;
+  this->box = NULL;
+}
+
+
+/**
+ * processes the network monitor data
+ */
+void NetworkMonitor::process()
+{
+
+}
+
Index: branches/proxy/src/lib/network/monitor/network_monitor.h
===================================================================
--- branches/proxy/src/lib/network/monitor/network_monitor.h	(revision 9275)
+++ branches/proxy/src/lib/network/monitor/network_monitor.h	(revision 9275)
@@ -0,0 +1,71 @@
+/*!
+ * @file network_monitor.h
+ *  a class to monitor the network: throughput, network nodes
+ */
+
+#ifndef _NETWORK_MONITOR_H
+#define _NETWORK_MONITOR_H
+
+#include "base_object.h"
+#include "synchronizeable.h"
+
+#include <list>
+
+class NetworkStream;
+class PeerInfo;
+
+namespace OrxGui { class GLGuiBox; };
+
+//!< a class representing a node in the network (this can be a MASTER_SERVER, PROXY_SERVER or a CLIENT
+class NetworkNode
+{
+  public:
+    NetworkNode() {}
+    ~NetworkNode() {}
+
+
+  private:
+    int                          nodeType;                     //!< the type of the node
+
+    std::list<PeerInfo*>         clientList;                   //!< list of all clients in the network
+    std::list<PeerInfo*>         proxyServerList;              //!< list of all proxy servers in the network
+    std::list<PeerInfo*>         masterServerList;             //!< list of all master servers in the network (should be 1!! :D)
+
+};
+
+//!< a class that monitors the whole network. it tries to gather all informations its able to from the network
+class NetworkMonitor : public Synchronizeable
+{
+
+  public:
+    NetworkMonitor(NetworkStream* networkStream);
+    virtual ~NetworkMonitor();
+
+
+    void addClient(PeerInfo* node);
+    void addProxyServer(PeerInfo* node);
+    void addMasterServer(PeerInfo* node);
+
+    void removeClient(PeerInfo* node);
+    void removeProxyServer(PeerInfo* node);
+    void removeMasterServer(PeerInfo* node);
+
+    void showGUI();
+    void hideGUI();
+
+    void process();
+
+
+  private:
+    std::list<PeerInfo*>         clientList;                   //!< list of all clients in the network
+    std::list<PeerInfo*>         proxyServerList;              //!< list of all proxy servers in the network
+    std::list<PeerInfo*>         masterServerList;             //!< list of all master servers in the network (should be 1!! :D)
+
+
+    OrxGui::GLGuiBox*            box;
+
+    int                          playerNumber;                 //!< total number of players in the game
+};
+
+
+#endif
Index: branches/proxy/src/lib/network/network_monitor.cc
===================================================================
--- branches/proxy/src/lib/network/network_monitor.cc	(revision 9274)
+++ 	(revision )
@@ -1,180 +1,0 @@
-/*
-   orxonox - the future of 3D-vertical-scrollers
-
-   Copyright (C) 2004 orx
-
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 2, or (at your option)
-   any later version.
-
-### File Specific:
-   main-programmer: Patrick Boenzli
-*/
-
-#include "glgui.h"
-#include "shell_command.h"
-
-#include "network_stream.h"
-#include "debug.h"
-
-#include "network_monitor.h"
-
-SHELL_COMMAND(showGUI, NetworkMonitor, showGUI);
-SHELL_COMMAND(hideGUI, NetworkMonitor, hideGUI);
-// SHELL_COMMAND(output, MappedWater, saveParams);
-
-
-
-/**
- * starts a network monitor
- */
-NetworkMonitor::NetworkMonitor(NetworkStream* networkStream)
-{
-  this->playerNumber = 0;
-}
-
-
-/**
- * deconstructor
- */
-NetworkMonitor::~NetworkMonitor()
-{}
-
-
-/**
- * adds a client
- */
-void NetworkMonitor::addClient(PeerInfo* node)
-{
-  this->clientList.push_back(node);
-  this->playerNumber++;
-}
-
-/**
- * adds a proxy server
- */
-void NetworkMonitor::addProxyServer(PeerInfo* node)
-{
-  this->proxyServerList.push_back(node);
-  this->playerNumber++;
-}
-
-/**
- * adds a master server
- */
-void NetworkMonitor::addMasterServer(PeerInfo* node)
-{
-  this->masterServerList.push_back(node);
-  this->playerNumber++;
-}
-
-/**
- * removes a client
- */
-void NetworkMonitor::removeClient(PeerInfo* node)
-{
-  std::list<PeerInfo*>::iterator it = this->clientList.begin();
-  for(; it != this->clientList.end(); it++)
-  {
-    if( *it == node)
-    {
-      this->clientList.erase(it);
-      this->playerNumber--;
-      return;
-    }
-  }
-
-  PRINTF(2)("Could not remove client from the list, very strange...");
-}
-
-/**
- * removes a proxy server
- */
-void NetworkMonitor::removeProxyServer(PeerInfo* node)
-{
-  std::list<PeerInfo*>::iterator it = this->proxyServerList.begin();
-  for(; it != this->proxyServerList.end(); it++)
-  {
-    if( *it == node)
-    {
-      this->proxyServerList.erase(it);
-      this->playerNumber--;
-      return;
-    }
-  }
-
-  PRINTF(2)("Could not remove proxy server from the list, very strange...");
-}
-
-/**
- * removes a master server
- */
-void NetworkMonitor::removeMasterServer(PeerInfo* node)
-{
-  std::list<PeerInfo*>::iterator it = this->masterServerList.begin();
-  for(; it != this->masterServerList.end(); it++)
-  {
-    if( *it == node)
-    {
-      this->masterServerList.erase(it);
-      this->playerNumber--;
-      return;
-    }
-  }
-
-  PRINTF(2)("Could not remove client from the list, very strange...");
-}
-
-
-
-/**
- * this displays the network monitor gui
- */
-void NetworkMonitor::showGUI()
-{
-  if (this->box == NULL)
-  {
-    this->box = new OrxGui::GLGuiBox(OrxGui::Vertical);
-    {
-      OrxGui::GLGuiBox* waterColorBox = new OrxGui::GLGuiBox(OrxGui::Horizontal);
-      {
-        OrxGui::GLGuiText* waterColorText = new OrxGui::GLGuiText();
-        waterColorText->setText("NetworkMonitor");
-        waterColorBox->pack(waterColorText);
-      }
-      this->box->pack(waterColorBox);
-    }
-
-    this->box->showAll();
-    this->box->setAbsCoor2D(300, 40);
-    OrxGui::GLGuiHandler::getInstance()->activate();
-//     OrxGui::GLGuiHandler::getInstance()->activateCursor();
-  }
-}
-
-
-/**
- * hides the network monitor gui again
- */
-void NetworkMonitor::hideGUI()
-{
-  if( this->box == NULL)
-    return;
-
-  OrxGui::GLGuiHandler::getInstance()->deactivate();
-//   OrxGui::GLGuiHandler::getInstance()->deactivateCursor();
-
-  delete this->box;
-  this->box = NULL;
-}
-
-
-/**
- * processes the network monitor data
- */
-void NetworkMonitor::process()
-{
-
-}
-
Index: branches/proxy/src/lib/network/network_monitor.h
===================================================================
--- branches/proxy/src/lib/network/network_monitor.h	(revision 9274)
+++ 	(revision )
@@ -1,71 +1,0 @@
-/*!
- * @file network_monitor.h
- *  a class to monitor the network: throughput, network nodes
- */
-
-#ifndef _NETWORK_MONITOR_H
-#define _NETWORK_MONITOR_H
-
-#include "base_object.h"
-#include "synchronizeable.h"
-
-#include <list>
-
-class NetworkStream;
-class PeerInfo;
-
-namespace OrxGui { class GLGuiBox; };
-
-//!< a class representing a node in the network (this can be a MASTER_SERVER, PROXY_SERVER or a CLIENT
-class NetworkNode
-{
-  public:
-    NetworkNode() {}
-    ~NetworkNode() {}
-
-
-  private:
-    int                          nodeType;                     //!< the type of the node
-
-    std::list<PeerInfo*>         clientList;                   //!< list of all clients in the network
-    std::list<PeerInfo*>         proxyServerList;              //!< list of all proxy servers in the network
-    std::list<PeerInfo*>         masterServerList;             //!< list of all master servers in the network (should be 1!! :D)
-
-};
-
-//!< a class that monitors the whole network. it tries to gather all informations its able to from the network
-class NetworkMonitor : public Synchronizeable
-{
-
-  public:
-    NetworkMonitor(NetworkStream* networkStream);
-    virtual ~NetworkMonitor();
-
-
-    void addClient(PeerInfo* node);
-    void addProxyServer(PeerInfo* node);
-    void addMasterServer(PeerInfo* node);
-
-    void removeClient(PeerInfo* node);
-    void removeProxyServer(PeerInfo* node);
-    void removeMasterServer(PeerInfo* node);
-
-    void showGUI();
-    void hideGUI();
-
-    void process();
-
-
-  private:
-    std::list<PeerInfo*>         clientList;                   //!< list of all clients in the network
-    std::list<PeerInfo*>         proxyServerList;              //!< list of all proxy servers in the network
-    std::list<PeerInfo*>         masterServerList;             //!< list of all master servers in the network (should be 1!! :D)
-
-
-    OrxGui::GLGuiBox*            box;
-
-    int                          playerNumber;                 //!< total number of players in the game
-};
-
-
-#endif
Index: branches/proxy/src/lib/network/network_stream.cc
===================================================================
--- branches/proxy/src/lib/network/network_stream.cc	(revision 9274)
+++ branches/proxy/src/lib/network/network_stream.cc	(revision 9275)
@@ -25,6 +25,6 @@
 #include "udp_socket.h"
 #include "udp_server_socket.h"
-#include "connection_monitor.h"
-#include "network_monitor.h"
+#include "monitor/connection_monitor.h"
+#include "monitor/network_monitor.h"
 #include "synchronizeable.h"
 #include "network_game_manager.h"
Index: branches/proxy/src/lib/network/network_stream.h
===================================================================
--- branches/proxy/src/lib/network/network_stream.h	(revision 9274)
+++ branches/proxy/src/lib/network/network_stream.h	(revision 9275)
@@ -14,5 +14,5 @@
 #include "server_socket.h"
 #include "handshake.h"
-#include "connection_monitor.h"
+#include "monitor/connection_monitor.h"
 #include "udp_server_socket.h"
 #include "peer_info.h"
Index: branches/proxy/src/lib/network/peer_info.h
===================================================================
--- branches/proxy/src/lib/network/peer_info.h	(revision 9274)
+++ branches/proxy/src/lib/network/peer_info.h	(revision 9275)
@@ -9,5 +9,5 @@
 #include "server_socket.h"
 #include "handshake.h"
-#include "connection_monitor.h"
+#include "monitor/connection_monitor.h"
 
 
