stk-code_catmod/dev/SocketsBase/network_manager.hpp
hilnius 57b7534a6d basic protocol intrication, sending address info online, a client can set his public transport adress (ip:port) in a sql database
git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/branches/hilnius@12873 178a84e3-b1eb-0310-8ba1-8eac791a3b58
2013-06-18 00:42:11 +00:00

33 lines
788 B
C++

#ifndef NETWORKMANAGER_HPP
#define NETWORKMANAGER_HPP
#include "stk_peer.hpp"
#include "stk_host.hpp"
#include <vector>
#include "protocol_manager.hpp"
class NetworkManager
{
public:
NetworkManager();
virtual ~NetworkManager();
virtual void run() = 0;
static void setManualSocketsMode(bool manual);
static void sendRawPacket(uint8_t* data, int length, unsigned int dstIp, unsigned short dstPort);
static void receptionCallback(char* data);
virtual void packetReceived(char* data) = 0;
static STKHost* getHost();
protected:
std::vector<STKPeer*> m_peers;
STKHost* m_localhost;
static NetworkManager* instance;
};
#endif // NETWORKMANAGER_HPP