Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

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

Last change on this file since 5592 was 5592, checked in by rennerc, 18 years ago

resolved conflict

File size: 819 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
14/* include base_object.h since all classes are derived from this one */
15#include "base_object.h"
16
17/* using namespace std is default, this needs to be here */
18using namespace std;
19
20class NetworkSocket : public BaseObject
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.