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, 19 years ago

resolved conflict

File size: 819 bytes
RevLine 
[5531]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
[5565]10/* include this file, it contains some default definitions */
11#include "netdefs.h"
[5531]12
[5565]13
[5592]14/* include base_object.h since all classes are derived from this one */
15#include "base_object.h"
[5588]16
[5565]17/* using namespace std is default, this needs to be here */
18using namespace std;
19
[5592]20class NetworkSocket : public BaseObject
[5531]21{
22
[5565]23private:
[5592]24  IPaddress serverAddress;
25  unsigned int port;
26  TCPsocket tcpSocket;
27  UDPsocket udpSocket;
[5565]28
[5531]29public:
30
31  NetworkSocket();
32  ~NetworkSocket();
[5533]33
[5565]34  void connectToServer(IPaddress ip, unsigned int port);
35  void listen(unsigned int port);
[5531]36  void disconnectServer();
[5565]37  void writeBytes(byte* data);
38  byte* readBytes();
[5533]39
[5531]40};
41
42
43
[5532]44#endif /* _NETWORK_SOCKET */
Note: See TracBrowser for help on using the repository browser.