Added an event to search for servers.
Client now broadcasts a serverlistrequest. An active server will then answer the request and send info about the server. The client saves this data to a list and presents it to the user.
This commit is contained in:
@@ -13,7 +13,9 @@ public:
|
||||
void AcceptNewConnections(int& nextPlayerID, std::map<PlayerID, PlayerDefinition>& connectedPlayers);
|
||||
void Receive(Packet & packet, PlayerDefinition & playerDefinition);
|
||||
void Send(Packet & packet, PlayerDefinition & playerDefinition);
|
||||
void Send(Packet & packet);
|
||||
void Send(Packet & packet);
|
||||
void Send(Packet & packet, boost::asio::ip::udp::endpoint endpoint);
|
||||
void Broadcast(Packet & packet, int port);
|
||||
bool IsSocketAvailable();
|
||||
private:
|
||||
// UDP logic
|
||||
|
||||
Reference in New Issue
Block a user