Index: trunk/src/lib/network/handshake.h
===================================================================
--- trunk/src/lib/network/handshake.h	(revision 9406)
+++ trunk/src/lib/network/handshake.h	(revision 9494)
@@ -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; }
 
 
