Changeset 6695 in orxonox.OLD for trunk/src/lib/network/network_manager.h
- Timestamp:
- Jan 25, 2006, 2:39:53 PM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/lib/network/network_manager.h
r6341 r6695 6 6 /* you will want to add such a a line at your header file also, since it will 7 7 prevent c++ from including your code twice*/ 8 #ifndef _NETWORK_MAN GER8 #ifndef _NETWORK_MANAGER 9 9 #define _NETWORK_MANAGER 10 10 11 11 /* include this file, it contains some default definitions */ 12 12 #include "netdefs.h" 13 #include "shared_network_data.h" 13 14 14 15 /* include base_object.h since all classes are derived from this one */ … … 38 39 int createServer(unsigned int port); 39 40 40 NetworkStream& establishConnection(IPaddress& address, Synchronizeable& sync);41 void shutdownConnection();42 43 44 void setHostID(int id);45 41 /** Returns the hostID @return The hostID of the object */ 46 inline int getHostID() { return this-> hostID; }47 inline bool isGameServer() { return this-> bGameServer; }42 inline int getHostID() { return this->sharedNetworkData->getHostID(); } 43 inline bool isGameServer() { return this->sharedNetworkData->isGameServer(); } 48 44 49 45 50 46 void connectSynchronizeable(Synchronizeable& sync); 51 47 void synchronize(); 48 49 void debug(); 50 52 51 53 52 private: … … 59 58 const std::list<BaseObject*>* syncList; // list of synchronizeables 60 59 static NetworkManager* singletonRef; //!< Pointer to the only instance of this Class 61 NetworkStream* tmpStream; //!< FIXME: this is only for testing purposes 62 int hostID; //!< The Host-ID of the Manager 63 bool bGameServer; //!< true if it is a server 60 NetworkStream* defaultSyncStream; //!< FIXME: this is only for testing purposes 64 61 62 SharedNetworkData* sharedNetworkData; //!< reference to the shared data 65 63 }; 66 64
Note: See TracChangeset
for help on using the changeset viewer.