group2 0.1.0
CSE 125 Group 2
Loading...
Searching...
No Matches
DiscoveryClient Class Reference

#include <DiscoveryClient.hpp>

Classes

struct  DiscoveredServer

Public Member Functions

bool start (uint16_t discoveryPort)
void stop ()
void poll ()
void refresh (bool clearExisting=false)
 Immediately send a LAN discovery request.
std::vector< DiscoveredServergetServers ()

Private Attributes

uint16_t discoveryPort = 0
NET_Address * broadcastAddr = nullptr
std::vector< NET_Address * > subnetBroadcastAddrs
uint64_t lastRequestMs = 0
NET_DatagramSocket * socket = nullptr
std::unordered_map< std::string, DiscoveredServerdiscoveredServers

Member Function Documentation

◆ getServers()

std::vector< DiscoveryClient::DiscoveredServer > DiscoveryClient::getServers ( )

◆ poll()

void DiscoveryClient::poll ( )
Here is the call graph for this function:

◆ refresh()

void DiscoveryClient::refresh ( bool clearExisting = false)

Immediately send a LAN discovery request.

Parameters
clearExistingTrue when starting a user-requested fresh scan.
Here is the caller graph for this function:

◆ start()

bool DiscoveryClient::start ( uint16_t discoveryPort)
Here is the call graph for this function:

◆ stop()

void DiscoveryClient::stop ( )

Member Data Documentation

◆ broadcastAddr

NET_Address* DiscoveryClient::broadcastAddr = nullptr
private

◆ discoveredServers

std::unordered_map<std::string, DiscoveredServer> DiscoveryClient::discoveredServers
private

◆ discoveryPort

uint16_t DiscoveryClient::discoveryPort = 0
private

◆ lastRequestMs

uint64_t DiscoveryClient::lastRequestMs = 0
private

◆ socket

NET_DatagramSocket* DiscoveryClient::socket = nullptr
private

◆ subnetBroadcastAddrs

std::vector<NET_Address*> DiscoveryClient::subnetBroadcastAddrs
private

The documentation for this class was generated from the following files: