Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 6695 in orxonox.OLD for trunk/src/lib/network/network_manager.h


Ignore:
Timestamp:
Jan 25, 2006, 2:39:53 PM (18 years ago)
Author:
patrick
Message:

merged the network branche to the trunk

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/lib/network/network_manager.h

    r6341 r6695  
    66/* you will want to add such a a line at your header file also, since it will
    77   prevent c++ from including your code twice*/
    8 #ifndef _NETWORK_MANGER
     8#ifndef _NETWORK_MANAGER
    99#define _NETWORK_MANAGER
    1010
    1111/* include this file, it contains some default definitions */
    1212#include "netdefs.h"
     13#include "shared_network_data.h"
    1314
    1415/* include base_object.h since all classes are derived from this one */
     
    3839    int createServer(unsigned int port);
    3940
    40     NetworkStream& establishConnection(IPaddress& address, Synchronizeable& sync);
    41     void shutdownConnection();
    42 
    43 
    44     void setHostID(int id);
    4541    /** 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(); }
    4844
    4945
    5046    void connectSynchronizeable(Synchronizeable& sync);
    5147    void synchronize();
     48
     49    void debug();
     50
    5251
    5352  private:
     
    5958    const std::list<BaseObject*>*    syncList;                // list of synchronizeables
    6059    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
    6461
     62    SharedNetworkData*               sharedNetworkData;       //!< reference to the shared data
    6563};
    6664
Note: See TracChangeset for help on using the changeset viewer.