#include <DiscoveryServer.hpp>
◆ loop()
| void DiscoveryServer::loop |
( |
| ) |
|
|
private |
◆ start()
| bool DiscoveryServer::start |
( |
uint16_t | port, |
|
|
const ServerInfo & | serverInfo, |
|
|
std::function< uint8_t()> | playerCountFn = nullptr, |
|
|
std::function< uint32_t()> | globalServerIdFn = nullptr ) |
starts a thread that makes a UDP socket and broadcasts
◆ stop()
| void DiscoveryServer::stop |
( |
| ) |
|
◆ updateInfo()
| void DiscoveryServer::updateInfo |
( |
const ServerInfo & | serverInfo | ) |
|
◆ broadcastThread
| std::thread DiscoveryServer::broadcastThread |
|
private |
◆ currentPlayersFn
| std::function<uint8_t()> DiscoveryServer::currentPlayersFn |
|
private |
◆ globalServerIdFn
| std::function<uint32_t()> DiscoveryServer::globalServerIdFn |
|
private |
◆ info
◆ infoMutex
| std::mutex DiscoveryServer::infoMutex |
|
private |
◆ shouldStop
| std::atomic<bool> DiscoveryServer::shouldStop {false} |
|
private |
◆ socket
| NET_DatagramSocket* DiscoveryServer::socket = nullptr |
|
private |
The documentation for this class was generated from the following files: