Moved UDP logic from Hybrid server/client to UDP server/client. fixed bug in Server::CheckForTimeOuts.
This commit is contained in:
@@ -0,0 +1,25 @@
|
||||
#ifndef UDPServer_h__
|
||||
#define UDPServer_h__
|
||||
|
||||
#include "Server.h"
|
||||
#include <boost/asio/ip/udp.hpp>
|
||||
|
||||
class UDPServer : public Server
|
||||
{
|
||||
public:
|
||||
UDPServer();
|
||||
~UDPServer();
|
||||
private:
|
||||
// UDP logic
|
||||
boost::asio::io_service m_IOService;
|
||||
boost::asio::ip::udp::endpoint m_ReceiverEndpoint;
|
||||
std::unique_ptr<boost::asio::ip::udp::socket> m_Socket;
|
||||
|
||||
void readFromClients();
|
||||
int receive(char * data);
|
||||
void parseConnect(Packet & packet);
|
||||
void send(Packet & packet, PlayerDefinition & playerDefinition);
|
||||
void send(Packet & packet);
|
||||
};
|
||||
|
||||
#endif
|
||||
Reference in New Issue
Block a user