|
Wrath of Zeus
Made by Torchlight Games for CSE 125 SP24
|
#include <lobbybroadcaster.hpp>
Public Member Functions | |
| LobbyBroadcaster (boost::asio::io_context &io_context, const GameConfig &config) | |
| ~LobbyBroadcaster () | |
| void | startBroadcasting (const ServerLobbyBroadcastPacket &bcast_info) |
| void | setLobbyInfo (const Lobby &bcast_info) |
| void | stopBroadcasting () |
Class which abstracts away the logic of sending lobby broadcasts announcing that there is a server available on this LAN
| LobbyBroadcaster::LobbyBroadcaster | ( | boost::asio::io_context & | io_context, |
| const GameConfig & | config | ||
| ) |
Instantiates the Lobby Broadcast but does not start broadcasting yet
| LobbyBroadcaster::~LobbyBroadcaster | ( | ) |
Calls LobbyFinder::stopBroadcasting(), if it hasn't already been called.
Tell the broadcaster the current state of the lobby so it can broadcast updated messages.
| void LobbyBroadcaster::startBroadcasting | ( | const ServerLobbyBroadcastPacket & | bcast_info | ) |
Start broadcasting that this lobby is available to join, if it isn't already broadcasting.
| void LobbyBroadcaster::stopBroadcasting | ( | ) |
Tells the LobbyBroadcaster to stop advertising that there is a lobby open. Called automatically in the destructor if not called explicitly beforehand.