R-Type
Networked shoot'em up built on Aegis2D
Loading...
Searching...
No Matches
rtype::Session Struct Reference

A logged-in player (RFC section 3). More...

#include </__w/project-rtype/project-rtype/server/include/rtype/sessions.hpp>

Public Attributes

std::uint32_t token = 0
 Token given in LoginAccepted, never 0.
 
std::uint32_t room = 0
 Room the player is in, 0 to SessionTable::rooms() - 1, or no_room in the lobby.
 
std::uint8_t player = 0
 Player number in its room, 0 to tuning::max_players - 1.
 
std::string name
 Name given at login, valid as valid_player_name() says.
 
std::optional< aegis2d::net::Endpoint > endpoint
 UDP endpoint the player plays from, once its Connect arrived (RFC 3.4): the player is then in game.
 
bool ready = false
 Whether the player is ready to start the game of its room (SetReady).
 

Detailed Description

A logged-in player (RFC section 3).

Member Data Documentation

◆ endpoint

std::optional<aegis2d::net::Endpoint> rtype::Session::endpoint

UDP endpoint the player plays from, once its Connect arrived (RFC 3.4): the player is then in game.

◆ name

std::string rtype::Session::name

Name given at login, valid as valid_player_name() says.

◆ player

std::uint8_t rtype::Session::player = 0

Player number in its room, 0 to tuning::max_players - 1.

◆ ready

bool rtype::Session::ready = false

Whether the player is ready to start the game of its room (SetReady).

◆ room

std::uint32_t rtype::Session::room = 0

Room the player is in, 0 to SessionTable::rooms() - 1, or no_room in the lobby.

◆ token

std::uint32_t rtype::Session::token = 0

Token given in LoginAccepted, never 0.


The documentation for this struct was generated from the following file: