Orxonox  0.0.5 Codename: Arcturus
MasterServerComm.h
Go to the documentation of this file.
1 /*
2  * ORXONOX - the hottest 3D action shooter ever to exist
3  * > www.orxonox.net <
4  *
5  *
6  * License notice:
7  *
8  * This program is free software; you can redistribute it and/or
9  * modify it under the terms of the GNU General Public License
10  * as published by the Free Software Foundation; either version 2
11  * of the License, or (at your option) any later version.
12  *
13  * This program is distributed in the hope that it will be useful,
14  * but WITHOUT ANY WARRANTY; without even the implied warranty of
15  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16  * GNU General Public License for more details.
17  *
18  * You should have received a copy of the GNU General Public License
19  * along with this program; if not, write to the Free Software
20  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
21  *
22  * Author:
23  * Sandro 'smerkli' Merkli
24  * Co-authors:
25  * ...
26  *
27  */
28 
29 #ifndef _MasterServerComm_H__
30 #define _MasterServerComm_H__
31 
32 #include "NetworkPrereqs.h"
33 
34 #include <cstdlib>
35 #include <cstdio>
36 #include <string>
37 #include <cstring>
38 #include <enet/enet.h>
39 
40 
41 namespace orxonox
42 {
44  {
45  public:
48 
51 
56  int initialize();
57 
58  void update();
59 
60 
67  int connect( const char *address, unsigned int port );
68 
73  int disconnect( void );
74 
80  int sendRequest( const char *data );
81 
88  int sendRequest( std::string data );
89 
95  int pollForReply( WANDiscovery* listener, int delayms );
96 
97  private:
100 
103 
106 
109  };
110 
111 }
112 
113 #endif /* _MasterServerComm_H__ */
Portable internet address structure.
Definition: enet.h:82
Shared library macros, enums, constants and forward declarations for the network library ...
ENetAddress address
address holder
Definition: MasterServerComm.h:105
Definition: MasterServerComm.h:43
::std::string string
Definition: gtest-port.h:756
ENetHost * client
client handle
Definition: MasterServerComm.h:99
An ENet host for communicating with peers.
Definition: enet.h:345
Definition: WANDiscovery.h:47
ENetPeer * peer
peer data holder
Definition: MasterServerComm.h:108
An ENet event as returned by enet_host_service().
Definition: enet.h:416
An ENet peer which data packets may be sent or received from.
Definition: enet.h:253
Die Wagnis Klasse hat die folgenden Aufgaben:
Definition: ApplicationPaths.cc:66
#define _NetworkExport
Definition: NetworkPrereqs.h:59
ENet public header file.
ENetEvent event
event data holder
Definition: MasterServerComm.h:102