Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: orxonox.OLD/branches/network/src/lib/network/network_socket.h @ 5588

Last change on this file since 5588 was 5588, checked in by patrick, 18 years ago

network: added the network definitions

File size: 749 bytes
Line 
1/*!
2 * @file network_socket.h
3  *  Main interface for the network module. Manages all the modules
4
5*/
6
7#ifndef _NETWORK_SOCKET
8#define _NETWORK_SOCKET
9
10/* include this file, it contains some default definitions */
11#include "netdefs.h"
12
13/* include SDL_net header */
14#include "confincl.h"
15
16
17/* using namespace std is default, this needs to be here */
18using namespace std;
19
20class NetworkSocket
21{
22
23private:
24        IPaddress serverAddress;
25        unsigned int port;
26        TCPsocket tcpSocket;
27        UDPsocket udpSocket;
28
29public:
30
31  NetworkSocket();
32  ~NetworkSocket();
33
34  void connectToServer(IPaddress ip, unsigned int port);
35  void listen(unsigned int port);
36  void disconnectServer();
37  void writeBytes(byte* data);
38  byte* readBytes();
39
40};
41
42
43
44#endif /* _NETWORK_SOCKET */
Note: See TracBrowser for help on using the repository browser.