Changeset 9249 in orxonox.OLD for branches/proxy/src/lib/network/network_stream.h
- Timestamp:
- Jul 12, 2006, 10:41:00 AM (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/proxy/src/lib/network/network_stream.h
r9248 r9249 27 27 public: 28 28 PeerInfo() { clear(); } 29 void clear() { userId = 0; is Server = false; socket = NULL; handshake = NULL; lastAckedState = 0; lastRecvedState = 0; connectionMonitor = NULL; }29 void clear() { userId = 0; isMasterServer = false; socket = NULL; handshake = NULL; lastAckedState = 0; lastRecvedState = 0; connectionMonitor = NULL; } 30 30 31 31 32 32 public: 33 33 int userId; 34 bool isServer; 34 bool isMasterServer; 35 bool isProxyServer; 36 bool isClient; 35 37 NetworkSocket * socket; 36 38 Handshake * handshake; … … 75 77 76 78 inline bool isUserIdActive( int userID ) { return (peers.find(userID) != peers.end()); } 77 inline bool isUserServer( int userID ){ if ( !isUserIdActive(userID) ) return false; return peers[userID].isServer; } 79 inline bool isUserMasterServer( int userID ){ if ( !isUserIdActive(userID) ) return false; return peers[userID].isMasterServer; } 80 inline bool isUserProxyServer( int userID ){ if ( !isUserIdActive(userID) ) return false; return peers[userID].isProxyServer; } 81 inline bool isUserClient( int userID ){ if ( !isUserIdActive(userID) ) return false; return peers[userID].isClient; } 78 82 79 83 void debug();
Note: See TracChangeset
for help on using the changeset viewer.