Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: orxonox.OLD/branches/spaceshipcontrol/src/lib/network/network_manager.h @ 6028

Last change on this file since 6028 was 5822, checked in by bensch, 19 years ago

orxonox/trunk: merged branches/network to the trunk
merged with command:
svn merge -r 5505:HEAD branches/network trunk

conflicts resolved in favor of the trunk (as always :))
also fixed a typo in the #include "SDL_tread.h"

File size: 1.4 KB
Line 
1/*!
2 * @file network_manager.h
3  *  Main interface for the network module. Manages all the modules
4*/
5
6/* you will want to add such a a line at your header file also, since it will
7   prevent c++ from including your code twice*/
8#ifndef _NETWORK_MANGER
9#define _NETWORK_MANAGER
10
11/* include this file, it contains some default definitions */
12#include "netdefs.h"
13
14/* include base_object.h since all classes are derived from this one */
15#include "base_object.h"
16
17
18/* forward declarations for the header file (include the header via #include "bla.h" in the source file) */
19class NetworkStream;
20class Synchronizeable;
21template<typename> class tList;
22
23/* and here is the class itsself*/
24class NetworkManager : public BaseObject
25{
26
27public:
28
29  NetworkManager();
30  ~NetworkManager();
31
32  void initialize();
33  void shutdown();
34
35  NetworkStream& establishConnection(IPaddress& address, Synchronizeable& sync);
36  NetworkStream& establishConnection(const char& hostName, const Synchronizeable& sync);
37  NetworkStream& createServer(Synchronizeable& sync, unsigned int port);
38  void shutdownConnection();
39
40  void synchronize();
41
42private:
43  std::list<BaseObject*>*    netStreamList;            // list with refs to all network streams
44  std::list<BaseObject*>*    syncList;                 // list of synchronizeables
45
46};
47
48
49
50#endif /* _NETWORK_MANAGER */
Note: See TracBrowser for help on using the repository browser.