Index: branches/proxy/src/lib/network/handshake.h
===================================================================
--- branches/proxy/src/lib/network/handshake.h	(revision 9453)
+++ branches/proxy/src/lib/network/handshake.h	(revision 9454)
@@ -49,34 +49,34 @@
     /* functions indicating states of the handshake */
     /** @returns true if the handshake is completed */
-    inline bool completed(){ return localState.completed != 0 && remoteState.completed != 0; }
+    inline bool completed() const { return localState.completed != 0 && remoteState.completed != 0; }
     /** @returns true if no error has occured until now */
-    inline bool ok(){ return localState.error == 0 && remoteState.error == 0; }
+    inline bool ok() const { return localState.error == 0 && remoteState.error == 0; }
     /** stops the handshake and reject the other side with @param reason: string describing the reason */
     inline void doReject( std::string reason ){ localState.error = 1; localState.errorString = "the server rejected your connection ["+ reason +"]"; }
     /** @returns true if the handshake is finished and the instances can be deleted */
-    inline bool canDel(){ return localState.canDel == 1 && remoteState.canDel == 1; }
+    inline bool canDel() const { return localState.canDel == 1 && remoteState.canDel == 1; }
     /** @returns true if the local state can be removed*/
-    inline bool allowDel(){ return localState.canDel == 1; }
+    inline bool allowDel() const { return localState.canDel == 1; }
     /** marks the handshake to be deleted */
-    inline void del(){ localState.canDel = 1; }
+    inline void del() { localState.canDel = 1; }
 
 
     /* the actual informations exchanged in the handshake */
     /** @returns the host id of the remote host */
-    inline int  getHostId(){ return remoteState.hostId; }
+    inline int  getHostId() const { return remoteState.hostId; }
     /** @returns the unique id of the network game manager*/
-    inline int  getNetworkGameManagerId(){ return remoteState.networkManagerId; }
+    inline int  getNetworkGameManagerId() const { return remoteState.networkManagerId; }
     /** @returns the unique id of the message manager */
-    inline int  getMessageManagerId(){ return remoteState.messageManagerId; }
+    inline int  getMessageManagerId() const { return remoteState.messageManagerId; }
     /** @returns the node type of the remote host */
-    inline int getRemoteNodeType() { return this->remoteState.nodeType; }
+    inline int getRemoteNodeType() const { return this->remoteState.nodeType; }
 
     /** sets @param nick the prefereded nick name */
     inline void setPreferedNickName( const std::string & nick ){ localState.preferedNickName = nick; }
     /** @returns the prefered nick name */
-    inline std::string getPreferedNickName(){ return remoteState.preferedNickName; }
+    inline const std::string& getPreferedNickName() const { return remoteState.preferedNickName; }
 
     /** @returns if true the local client should reconnect to a proxy server from the proxy server list */
-    inline bool redirect() { return this->redirectProxy;}
+    inline bool redirect() const  { return this->redirectProxy; }
     /** @param flag: indicating if the client should be redirected */
     inline void setRedirect(bool flag) { if( SharedNetworkData::getInstance()->isClient()) return; this->redirectProxy = (int)flag; }
@@ -85,9 +85,9 @@
     inline void setProxy1Address(IP address) { if( SharedNetworkData::getInstance()->isClient()) return; this->proxy1 = address; }
     /** @returns the address of the proxy server 1 if any */
-    inline IP getProxy1Address() { return this->proxy1; }
+    inline IP getProxy1Address() const { return this->proxy1; }
     /** @param address: the address of the proxy server 2 if any */
     inline void setProxy2Address(IP address) { if( SharedNetworkData::getInstance()->isClient()) return; this->proxy2 = address; }
     /** @returns the address of the proxy server 2 if any */
-    inline IP getProxy2Address() { return this->proxy2; }
+    inline IP getProxy2Address() const { return this->proxy2; }
 
 
Index: branches/proxy/src/lib/network/message_manager.h
===================================================================
--- branches/proxy/src/lib/network/message_manager.h	(revision 9453)
+++ branches/proxy/src/lib/network/message_manager.h	(revision 9454)
@@ -26,5 +26,5 @@
 
 
-enum MessageId 
+enum MessageId
 {
   TESTMESSAGEID = 1,
@@ -52,5 +52,5 @@
   MP_HIGHBANDWIDTH = 1,  //!< fast and reliable but uses a lot of bandwidth
   MP_LOWBANDWIDTH,       //!< may take a long time to arrive. reliable
-  MP_UNRELIABLE          //!< unreliable. low bandwidth 
+  MP_UNRELIABLE          //!< unreliable. low bandwidth
 };
 
@@ -88,9 +88,9 @@
  public:
    inline static MessageManager * getInstance(){ if (!singletonRef) singletonRef = new MessageManager();  return singletonRef; }
-   
+
    virtual ~MessageManager();
-   
+
    bool registerMessageHandler( MessageId messageId, MessageCallback cb, void * someData );
-   
+
    void sendMessage( MessageId messageId, byte * data, int dataLength, RecieverType recieverType, int reciever, MessagePriority messagePriority );
 
@@ -100,5 +100,5 @@
    virtual void handleSentState( int userId, int stateId, int fromStateId ){}
    virtual void handleRecvState( int userId, int stateId, int fromStateId ){}
-   
+
    void initUser( int userId );
 
@@ -110,5 +110,5 @@
 
    int                       newNumber;              //!< used to create unique message numbers
-   std::list<NetworkMessage> incomingMessageBuffer; 
+   std::list<NetworkMessage> incomingMessageBuffer;
 
 };
Index: branches/proxy/src/lib/network/monitor/connection_monitor.cc
===================================================================
--- branches/proxy/src/lib/network/monitor/connection_monitor.cc	(revision 9453)
+++ branches/proxy/src/lib/network/monitor/connection_monitor.cc	(revision 9454)
@@ -32,5 +32,5 @@
   /* 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;
@@ -43,5 +43,5 @@
   this->nZIncomingPackets = 0;
   this->nZOutgoingPackets = 0;
-  
+
   this->lastPacketTick = 0;
   this->lastPrintTick = 0;
@@ -64,21 +64,21 @@
 {
   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 );
 }
@@ -94,7 +94,7 @@
 {
   nIncomingPackets++;
-  
+
   lastPacketTick = tick;
-  
+
   // calculate ping
   if ( sentStateTicks.find( ackedState ) != sentStateTicks.end() )
@@ -102,35 +102,35 @@
     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 
+ * @param packetHistory
+ * @param tick
  */
 void ConnectionMonitor::removeOldPackets( std::map< int, int > & packetHistory, int tick )
@@ -149,5 +149,5 @@
 {
   removeOldPackets( packetHistory, tick );
-  
+
   float res = 0.0f;
 #if 0
@@ -157,23 +157,23 @@
       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++ )
+  for ( std::map<int,int>::const_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;
 
@@ -191,9 +191,9 @@
 {
   nZOutgoingPackets++;
-  
+
   // calculate bandwidth
   outgoingZippedPacketHistory[tick] = length;
   outgoingZippedBandWidth = calculateBandWidth( outgoingZippedPacketHistory, tick );
-  
+
   //NETPRINTF(n)("UPSTREAM: user: %d bandwidth %f nOutgoingPackets %d\n", userId, outgoingZippedBandWidth, nOutgoingPackets );
 
@@ -216,11 +216,11 @@
 {
   nZIncomingPackets++;
-  
+
   // calculate bandwidth
   incomingZippedPacketHistory[tick] = length;
   incomingZippedBandWidth = calculateBandWidth( incomingZippedPacketHistory, tick );
-  
+
   //NETPRINTF(n)("DOWNSTREAM: user: %d bandwidth %f nIncomingPackets %d\n", userId, incomingZippedBandWidth, nIncomingPackets );
-  
+
 }
 
@@ -230,12 +230,12 @@
  * @return true if last packet recieved \< NOW() - SECS_TO_TIMEOUT
  */
-bool ConnectionMonitor::hasTimedOut( )
+bool ConnectionMonitor::hasTimedOut( ) const
 {
   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;
 }
@@ -246,5 +246,5 @@
  * prints bandwith usage, ping and other important things to telnet-console
  */
-void ConnectionMonitor::printStatis( )
+void ConnectionMonitor::printStatis( ) const
 {
   NETPRINT(n)("============NETWORKSTATS FOR USER %d============\n", userId);
Index: branches/proxy/src/lib/network/monitor/connection_monitor.h
===================================================================
--- branches/proxy/src/lib/network/monitor/connection_monitor.h	(revision 9453)
+++ branches/proxy/src/lib/network/monitor/connection_monitor.h	(revision 9454)
@@ -31,7 +31,7 @@
     void calculatePing();
 
-    bool hasTimedOut();
+    bool hasTimedOut() const;
 
-    void printStatis();
+    void printStatis() const;
     float getIncomingUnzippedBandWidth() const { return incomingUnzippedBandWidth; }
     float getOutgoingUnzippedBandWidth() const { return outgoingUnzippedBandWidth; }
Index: branches/proxy/src/lib/network/proxy/network_settings.h
===================================================================
--- branches/proxy/src/lib/network/proxy/network_settings.h	(revision 9453)
+++ branches/proxy/src/lib/network/proxy/network_settings.h	(revision 9454)
@@ -37,5 +37,5 @@
     inline void setMaxPlayer(int number) { this->maxPlayer = number; }
     /** @returns teh max number of players */
-    int getMaxPlayer() { return this->maxPlayer; }
+    int getMaxPlayer() const { return this->maxPlayer; }
     /** sets the @param saturation: a threshold in percente when the proxy servers should be activated to be able to redirect the clients */
     inline void setMaxPlayerSaturation(float saturation) { this->maxPlayerSaturation = saturation; }
@@ -44,5 +44,5 @@
     void setMasterAddr(const std::string& masterAddr);
     /** @returns the address of the master server read from the network config file */
-    inline IP getMasterAddr() { return this->masterServer; }
+    inline const IP& getMasterAddr() const { return this->masterServer; }
 
     void setProxyAddr(const std::string& proxyAddr);
