Wrath of Zeus
Made by Torchlight Games for CSE 125 SP24
Loading...
Searching...
No Matches
Public Member Functions
LobbyBroadcaster Class Reference

#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 ()
 

Detailed Description

Class which abstracts away the logic of sending lobby broadcasts announcing that there is a server available on this LAN

Constructor & Destructor Documentation

◆ LobbyBroadcaster()

LobbyBroadcaster::LobbyBroadcaster ( boost::asio::io_context &  io_context,
const GameConfig config 
)

Instantiates the Lobby Broadcast but does not start broadcasting yet

◆ ~LobbyBroadcaster()

LobbyBroadcaster::~LobbyBroadcaster ( )

Calls LobbyFinder::stopBroadcasting(), if it hasn't already been called.

Member Function Documentation

◆ setLobbyInfo()

void LobbyBroadcaster::setLobbyInfo ( const Lobby bcast_info)

Tell the broadcaster the current state of the lobby so it can broadcast updated messages.

◆ startBroadcasting()

void LobbyBroadcaster::startBroadcasting ( const ServerLobbyBroadcastPacket bcast_info)

Start broadcasting that this lobby is available to join, if it isn't already broadcasting.

◆ stopBroadcasting()

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.


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