Symple module

Client::ClientData

The client's private state: its options, loop, WebSocket connection, roster, rooms and reconnect timer.

ClientData

#include <src/symple/src/client/detail.h>

struct ClientData

Defined in src/symple/src/client/detail.h:15

Public Attributes

ReturnNameDescription
Optionsoptions
uv::Loop *loop
http::ClientConnection::Ptrws
Rosterroster
std::stringourID
std::unordered_set< std::string >currentRoomsAuthoritative rooms from welcome / acks.
std::unordered_set< std::string >desiredRoomsRooms the client wants persisted across reconnects.
std::unordered_set< std::string >pendingJoinsJoin requests sent but not yet acknowledged.
std::unordered_set< std::string >pendingLeavesLeave requests sent but not yet acknowledged.
intannounceStatus
TimerreconnectTimer
intreconnectCount
boolwasOnline
boolclosing
boolremoteShutdown

options

Options options

Type: Options

Defined in src/symple/src/client/detail.h:24


loop

uv::Loop * loop

Type: uv::Loop *

Defined in src/symple/src/client/detail.h:25


ws

http::ClientConnection::Ptr ws

Type: http::ClientConnection::Ptr

Defined in src/symple/src/client/detail.h:26


roster

Roster roster

Type: Roster

Defined in src/symple/src/client/detail.h:27


ourID

std::string ourID

Defined in src/symple/src/client/detail.h:28


currentRooms

std::unordered_set< std::string > currentRooms

Defined in src/symple/src/client/detail.h:29

Authoritative rooms from welcome / acks.


desiredRooms

std::unordered_set< std::string > desiredRooms

Defined in src/symple/src/client/detail.h:30

Rooms the client wants persisted across reconnects.


pendingJoins

std::unordered_set< std::string > pendingJoins

Defined in src/symple/src/client/detail.h:31

Join requests sent but not yet acknowledged.


pendingLeaves

std::unordered_set< std::string > pendingLeaves

Defined in src/symple/src/client/detail.h:32

Leave requests sent but not yet acknowledged.


announceStatus

int announceStatus = 0

Defined in src/symple/src/client/detail.h:33


reconnectTimer

Timer reconnectTimer

Type: Timer

Defined in src/symple/src/client/detail.h:34


reconnectCount

int reconnectCount = 0

Defined in src/symple/src/client/detail.h:35


wasOnline

bool wasOnline = false

Defined in src/symple/src/client/detail.h:36


closing

bool closing = false

Defined in src/symple/src/client/detail.h:37


remoteShutdown

bool remoteShutdown = false

Defined in src/symple/src/client/detail.h:38

Public Methods

ReturnNameDescription
ClientData inline explicit

ClientData

inline explicit

inline explicit ClientData(Options opts, uv::Loop * targetLoop)

Defined in src/symple/src/client/detail.h:17