430 return mMgclConnected;
435 mMgclConnected = nValue;
460 mSessionKey = pszSessionKey;
491 rtNetConnectionInfo mServerInfo;
497 std::vector<ClientClr> mColors;
498#ifndef VIDEO_STANDARD_PAL
502 std::vector<int> mRecipients;
503 std::vector<int> mAwaiting;
504 std::vector<ClientData> mClientData;
509 float mBlockDeadline;
Message with one line of chat between the consoles of an online session or lobby.
Definition chatmsg.h:24
Packet that describes one player of the session.
Definition clientinfopkt.h:21
Packet that delivers the new rating of a player after an online game.
Definition clientratingpkt.h:21
Packet a guest sends the host to acknowledge a DataBlockPkt.
Definition dataackpkt.h:21
ClientData(int nId, int nRank, int nRating)
Construct an entry.
Definition hostpadrt.h:57
static bool HigherRating(const ClientData &left, const ClientData &right)
Report whether an entry has a higher rating than another, the order of SendRanks().
Definition hostpadrt.h:81
bool operator==(const ClientData &other) const
Report whether two entries are of the same player.
Definition hostpadrt.h:68
int mRating
Definition hostpadrt.h:87
int mId
Definition hostpadrt.h:85
int mRank
Definition hostpadrt.h:86
The online session of a console that hosts it.
Definition hostpadrt.h:29
int GetMgclConnected() const
Definition hostpadrt.h:429
void SetMgclConnected(int nValue)
Definition hostpadrt.h:434
void OnConnected() override
Report HostLaunchpadSuccessMsg to the sink of mConnectTask.
void SetSharing(int nValue)
Definition hostpadrt.h:484
void RemovePlayer(int nId) override
Free the colour of a player who left, and forget the player.
bool OnMsg(ClientInfoPkt *pPkt)
Enter a console whose player arrived, or remove it when the session is full.
void BootPlayer(int nPlayer) override
Ban a guest from the session and remove the guest.
void SetServerInfo(const rtNetConnectionInfo &info)
Definition hostpadrt.h:449
bool OnMsg(ChatMsg *pMsg)
Send the key of the session to the account that requested it.
int GetSharing() const
Definition hostpadrt.h:479
const NetGameParams & GetParams() const
Definition hostpadrt.h:469
NetGameParams & GetParams()
Definition hostpadrt.h:464
void SetSessionKey(const char *pszSessionKey)
Definition hostpadrt.h:459
void ReportNow() override
Send the reports to the game server at the next poll.
void SendRanks()
Rank the players by rating and send the ranks to every console.
void PollShare()
Send the next block of the remix once every guest acknowledged the last, and remove the guests too sl...
void SendGameParams()
Send the settings of the game to every console, and send the world report at the next poll.
bool DispatchPriv(Message *pMsg) override
Act on a packet of the session, before LaunchpadRT does.
void FreeColor(int nId)
Free the colour of a player.
bool ShareRemix() override
Share the remix of the game with the guests only.
void EndEdit() override
Take the settings of the game again and publish them once the remix name is filtered.
void PollPriv() override
Poll the reports and the share, and watch the connection to the game server.
static constexpr int kMaxPlayers
The number of slots of a session.
Definition hostpadrt.h:91
bool OnMsg(ClientRatingPkt *pPkt)
Take the rating of a player and send the ranks again.
~HostpadRT() override
Stop mShareTask and clear TheHostpadRT.
float GetTime() override
Report the clock of this console, the clock of the session.
const String & GetSessionKey() const
Definition hostpadrt.h:454
NetMultiTask & GetShareTask()
Definition hostpadrt.h:474
bool StartShare(int nShareOnly)
Share the remix of the game with every guest once every player is ready.
void KickUnloaded()
Remove every guest that has not loaded the song.
void SendRating(int nRank) override
Send the rating of the host and note it in mClientData.
int CanJoin()
Report whether the session takes another player.
HostpadRT(MsgSink *pScreen, MsgSink *pGame)
Construct the session, draw its key, and start mConnectTask.
int Launch() override
Load the song on every console once every player is ready.
void EndGame() override
Leave the game and send the reports.
void PollStart()
Start the song once every console loaded it, and remove the consoles too slow to load.
void AddClient(int nId) override
Welcome a console that connected, or turn it away.
int GetLost() const
Definition hostpadrt.h:439
void SendScores(const std::vector< NetGameScore > &scores)
Send the final scores to every console, rate the game, and leave it.
bool OnMsg(TimeRequestPkt *pPkt)
Answer the clock of the session.
static void Create(MsgSink *pScreen, MsgSink *pGame)
Start hosting a session.
bool OnMsg(DataAckPkt *pPkt)
Note a guest that received the last block of the remix.
void SetLocalId(int nId) override
Take the identifier of this console and enter the host as the first player.
int AssignColor(int nId)
Give a player the first free colour.
int GetWorldStatus()
Report the state of the session for the game server.
void Kick(int nId, int nBan)
Remove a guest from the session, and ban the guest from the game server first.
const rtNetConnectionInfo & GetServerInfo() const
Definition hostpadrt.h:444
LaunchpadRT(MsgSink *pGame)
Construct the session, stored in TheNetLaunchpad and TheLaunchpadRT.
static constexpr int kKeySize
The size of the key of the session in bytes.
Definition launchpadrt.h:73
bool OnMsg(ClientStatusPkt *pPkt)
Take the state of a player.
Base of every event the game passes between a MsgSource and a MsgSink.
Definition message.h:40
Receiver of engine messages.
Definition msgsink.h:21
The settings of an online game that the host publishes with its session.
Definition netgameparams.h:13
A request to the online library, as the NetTask steps that run one after another.
Definition netmultitask.h:14
A task that runs again a fixed time after each run ends.
Definition periodictask.h:12
Growable text buffer that is also a PrnStream.
Definition string.h:19
Packet that asks a console for its clock, to measure the delay to it.
Definition timerequestpkt.h:20
HostpadRT * TheHostpadRT
The hosted session, or null.
The colour of a slot of the session and the player who holds it.
Definition hostpadrt.h:36
int mPlayer
Definition hostpadrt.h:38
int mColor
Definition hostpadrt.h:37