Changeset 9259 in orxonox.OLD for branches/proxy/src/lib
- Timestamp:
- Jul 12, 2006, 5:40:02 PM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/proxy/src/lib/network/handshake.h
r9258 r9259 40 40 41 41 42 /* functions indicating states of the handshake */ 42 43 /** @returns true if the handshake is completed */ 43 44 inline bool completed(){ return localState.completed != 0 && remoteState.completed != 0; } 44 45 /** @returns true if no error has occured until now */ 45 46 inline bool ok(){ return localState.error == 0 && remoteState.error == 0; } 46 /** @returns the host id of the remote host */47 inline int getHostId(){ return remoteState.hostId; }48 /** @returns the unique id of the network game manager*/49 inline int getNetworkGameManagerId(){ return remoteState.networkManagerId; }50 /** @returns the unique id of the message manager */51 inline int getMessageManagerId(){ return remoteState.messageManagerId; }52 /** stops the handshake and reject the other side with @param reason: string describing the reason */53 47 inline void doReject( std::string reason ){ localState.error = 1; localState.errorString = "the server rejected your connection ["+ reason +"]"; } 54 48 /** @returns true if the handshake is finished and the instances can be deleted */ … … 59 53 inline void del(){ localState.canDel = 1; } 60 54 55 /* the actual informations exchanged in the handshake */ 56 /** @returns the host id of the remote host */ 57 inline int getHostId(){ return remoteState.hostId; } 58 /** @returns the unique id of the network game manager*/ 59 inline int getNetworkGameManagerId(){ return remoteState.networkManagerId; } 60 /** @returns the unique id of the message manager */ 61 inline int getMessageManagerId(){ return remoteState.messageManagerId; } 62 /** stops the handshake and reject the other side with @param reason: string describing the reason */ 63 61 64 /** sets @param nick the prefereded nick name */ 62 65 inline void setPreferedNickName( const std::string & nick ){ localState.preferedNickName = nick; } … … 64 67 inline std::string getPreferedNickName(){ return remoteState.preferedNickName; } 65 68 69 /* variable handler function */ 66 70 virtual void varChangeHandler( std::list<int> & id ); 67 71 72 68 73 private: 69 HandshakeState localState;70 HandshakeState remoteState;74 HandshakeState localState; //!< the local handshake state 75 HandshakeState remoteState; //!< the remote handshake state 71 76 72 int netManId_handler;73 int msgManId_handler;74 int hostId_handler;75 int completed_handler;76 int error_handler;77 int errorString_handler;78 int orxId_handler;79 int version_handler;80 int candel_id;77 int netManId_handler; //!< network manager handler 78 int msgManId_handler; //!< message manager handler 79 int hostId_handler; 80 int completed_handler; 81 int error_handler; 82 int errorString_handler; 83 int orxId_handler; 84 int version_handler; 85 int candel_id; 81 86 82 87 };
Note: See TracChangeset
for help on using the changeset viewer.