Network code documentation for my turn-based game
1.0
Loading...
Searching...
No Matches
network
include
server
lobby.h
Go to the documentation of this file.
1
#pragma once
2
3
#include "
types.h
"
4
11
struct
ClientData
{
12
std::string
username
{};
13
Port
port
= 0;
14
};
15
22
class
Lobby
{
23
public
:
24
[[nodiscard]]
bool
IsComplete
() const noexcept;
25
void
AddClient
(const
ClientData
& client_data) noexcept;
26
void
Clear
() noexcept;
27
28
ClientData
client_data_1
;
29
ClientData
client_data_2
;
30
};
Lobby
Lobby is a class which provides a simple, naive way of differentiating between the different clients ...
Definition
lobby.h:22
Lobby::client_data_1
ClientData client_data_1
Definition
lobby.h:28
Lobby::AddClient
void AddClient(const ClientData &client_data) noexcept
Lobby::IsComplete
bool IsComplete() const noexcept
Lobby::client_data_2
ClientData client_data_2
Definition
lobby.h:29
Lobby::Clear
void Clear() noexcept
ClientData
ClientData is a struct which contains the username of a client and its port number....
Definition
lobby.h:11
ClientData::port
Port port
Definition
lobby.h:13
ClientData::username
std::string username
Definition
lobby.h:12
types.h
Port
std::uint16_t Port
Definition
types.h:19
Generated by
1.10.0