|
RunicVTT Open Source Virtual Tabletop for TTRPG using P2P
|
#include <NetworkManager.h>
Public Member Functions | |
| NetworkManager (flecs::world ecs, std::shared_ptr< IdentityManager > identity_manager) | |
| void | setup (std::weak_ptr< BoardManager > board_manager, std::weak_ptr< GameTableManager > gametable_manager) |
| ~NetworkManager () | |
| void | startServer (ConnectionType mode, unsigned short port, bool tryUpnp) |
| void | startServer (std::string internal_ip_address, unsigned short port) |
| void | closeServer () |
| bool | isConnected () |
| bool | isHosting () const |
| bool | hasAnyPeer () const |
| int | connectedPeerCount () const |
| void | allowPort (unsigned int port) |
| void | disallowPort (unsigned short port) |
| std::string | getNetworkInfo (ConnectionType type) |
| std::string | getLocalIPAddress () |
| std::string | getExternalIPAddress () |
| std::string | getLocalTunnelURL () |
| void | parseConnectionString (std::string connection_string, std::string &server, unsigned short &port, std::string &password) |
| unsigned short | getPort () const |
| std::string | getNetworkPassword () const |
| void | setPort (unsigned int port) |
| void | setNetworkPassword (const char *password) |
| Role | getPeerRole () const |
| void | ShowPortForwardingHelpPopup (bool *p_open) |
| rtc::Configuration | getRTCConfig () const |
| bool | connectToPeer (const std::string &connectionString) |
| bool | disconectFromPeers () |
| bool | removePeer (std::string peerId) |
| bool | clearPeers () const |
| bool | disconnectAllPeers () |
| std::size_t | removeDisconnectedPeers () |
| void | broadcastPeerDisconnect (const std::string &targetId) |
| void | onPeerLocalDescription (const std::string &peerId, const rtc::Description &desc) |
| void | onPeerLocalCandidate (const std::string &peerId, const rtc::Candidate &cand) |
| std::shared_ptr< PeerLink > | ensurePeerLink (const std::string &peerId) |
| std::string | displayNameForPeer (const std::string &peerId) const |
| std::string | getMyUsername () const |
| std::string | getMyUniqueId () const |
| const std::string & | getMyPeerId () const |
| void | setMyPeerId (std::string v) |
| const std::unordered_map< std::string, std::shared_ptr< PeerLink > > & | getPeers () const |
| std::shared_ptr< SignalingServer > | getSignalingServer () const |
| bool | tryPopReadyMessage (msg::ReadyMessage &out) |
| bool | tryPopRawMessage (msg::InboundRaw &out) |
| void | drainEvents () |
| void | drainInboundRaw (int maxPerTick) |
| void | decodeRawChatBuffer (const std::string &fromPeer, const std::vector< uint8_t > &b) |
| void | decodeRawNotesBuffer (const std::string &fromPeer, const std::vector< uint8_t > &b) |
| void | startRawDrainWorker () |
| void | stopRawDrainWorker () |
| void | onPeerChannelOpen (const std::string &peerId, const std::string &label) |
| void | bootstrapPeerIfReady (const std::string &peerId) |
| void | broadcastGameTable (const flecs::entity &gameTable) |
| void | broadcastBoard (const flecs::entity &board) |
| void | broadcastFog (uint64_t boardId, const flecs::entity &fog) |
| void | broadcastFogUpdate (uint64_t boardId, const flecs::entity &fog) |
| void | broadcastFogDelete (uint64_t boardId, const flecs::entity &fog) |
| void | sendFogUpdate (uint64_t boardId, const flecs::entity &fog, const std::vector< std::string > &toPeerIds) |
| void | sendFogDelete (uint64_t boardId, const flecs::entity &fog, const std::vector< std::string > &toPeerIds) |
| void | sendGameTo (const std::string &peerId, const std::vector< unsigned char > &bytes) |
| void | broadcastGameFrame (const std::vector< unsigned char > &frame, const std::vector< std::string > &toPeerIds) |
| void | sendGameTable (const flecs::entity &gameTable, const std::vector< std::string > &toPeerIds) |
| void | sendBoard (const flecs::entity &board, const std::vector< std::string > &toPeerIds) |
| void | sendFog (uint64_t boardId, const flecs::entity &fog, const std::vector< std::string > &toPeerIds) |
| bool | sendImageChunks (msg::ImageOwnerKind kind, uint64_t id, const std::vector< unsigned char > &img, const std::vector< std::string > &toPeerIds) |
| void | setToaster (std::shared_ptr< ImGuiToaster > t) |
| void | pushStatusToast (const std::string &msg, ImGuiToaster::Level lvl, float durationSec=5.0f) |
| std::vector< std::string > | getConnectedPeerIds () const |
| std::vector< std::string > | getConnectedUsernames () const |
| void | setGMId (const std::string &id) |
| const std::string & | getGMId () const |
| void | decodeRawGameBuffer (const std::string &fromPeer, const std::vector< uint8_t > &b) |
| void | sendMarkerDelete (uint64_t boardId, const flecs::entity &marker, const std::vector< std::string > &toPeerIds) |
| void | broadcastMarkerDelete (uint64_t boardId, const flecs::entity &marker) |
| void | broadcastMarker (uint64_t boardId, const flecs::entity &marker) |
| void | sendMarker (uint64_t boardId, const flecs::entity &marker, const std::vector< std::string > &toPeerIds) |
| void | decodeRawMarkerMoveBuffer (const std::string &fromPeer, const std::vector< uint8_t > &b) |
| void | markDraggingLocal (uint64_t markerId, bool dragging) |
| bool | isMarkerBeingDragged (uint64_t markerId) const |
| bool | amIDragging (uint64_t markerId) const |
| void | forceCloseDrag (uint64_t markerId) |
| void | broadcastMarkerMove (uint64_t boardId, const flecs::entity &marker) |
| void | sendMarkerMove (uint64_t boardId, const flecs::entity &marker, const std::vector< std::string > &toPeerIds) |
| void | broadcastMarkerMoveState (uint64_t boardId, const flecs::entity &marker) |
| void | sendMarkerMoveState (uint64_t boardId, const flecs::entity &marker, const std::vector< std::string > &toPeerIds) |
| void | broadcastMarkerUpdate (uint64_t boardId, const flecs::entity &marker) |
| void | sendMarkerUpdate (uint64_t boardId, const flecs::entity &marker, const std::vector< std::string > &toPeerIds) |
| bool | shouldApplyMarkerMove (const msg::ReadyMessage &m) |
| bool | shouldApplyMarkerMoveStateStart (const msg::ReadyMessage &m) |
| bool | shouldApplyMarkerMoveStateFinal (const msg::ReadyMessage &m) |
| void | broadcastGridUpdate (uint64_t boardId, const flecs::entity &board) |
| void | sendGridUpdate (uint64_t boardId, const flecs::entity &board, const std::vector< std::string > &toPeerIds) |
| void | buildUserNameUpdate (std::vector< uint8_t > &out, uint64_t tableId, const std::string &userUniqueId, const std::string &oldUsername, const std::string &newUsername, bool reboundFlag) const |
| void | broadcastUserNameUpdate (const std::vector< uint8_t > &payload) |
| void | sendUserNameUpdateTo (const std::string &peerId, const std::vector< uint8_t > &payload) |
| void | upsertPeerIdentityWithUnique (const std::string &peerId, const std::string &uniqueId, const std::string &username) |
| bool | broadcastChatJson (const msg::Json &j) |
| bool | sendChatJsonTo (const std::string &peerId, const msg::Json &j) |
| bool | sendChatJsonTo (const std::set< std::string > &peers, const msg::Json &j) |
| std::shared_ptr< IdentityManager > | getIdentityManager () |
| std::string | debugIdentitySnapshot () const |
| void | clearDragState (uint64_t markerId) |
| void | housekeepPeers () |
| void | setCustomHost (const std::string &h) |
| const std::string & | getCustomHost () const |
Public Attributes | |
| MessageQueue< msg::NetEvent > | events_ |
| MessageQueue< msg::InboundRaw > | inboundRaw_ |
| std::unordered_map< uint64_t, DragState > | drag_ |
Private Member Functions | |
| std::vector< unsigned char > | buildGridUpdateFrame (uint64_t boardId, const Grid &grid) |
| void | handleGridUpdate (const std::vector< uint8_t > &b, size_t &off) |
| uint32_t | getSendMoveMinPeriodMs () const |
| void | handleMarkerMove (const std::vector< uint8_t > &b, size_t &off) |
| void | handleMarkerUpdate (const std::vector< uint8_t > &b, size_t &off) |
| void | handleMarkerMoveState (const std::vector< uint8_t > &b, size_t &off) |
| std::vector< unsigned char > | buildMarkerMoveFrame (uint64_t boardId, const flecs::entity &marker, uint32_t seq) |
| std::vector< unsigned char > | buildMarkerMoveStateFrame (uint64_t boardId, const flecs::entity &marker) |
| std::vector< unsigned char > | buildMarkerUpdateFrame (uint64_t boardId, const flecs::entity &marker) |
| void | handleMarkerDelete (const std::vector< uint8_t > &b, size_t &off) |
| std::vector< unsigned char > | buildMarkerDeleteFrame (uint64_t boardId, uint64_t markerId) |
| std::vector< uint8_t > | buildCommitMarkerFrame (uint64_t boardId, uint64_t markerId) |
| std::vector< uint8_t > | buildCreateMarkerFrame (uint64_t boardId, const flecs::entity &marker, uint64_t imageBytesTotal) |
| void | handleMarkerMeta (const std::vector< uint8_t > &b, size_t &off) |
| void | handleGameTableSnapshot (const std::vector< uint8_t > &b, size_t &off) |
| void | handleBoardMeta (const std::vector< uint8_t > &b, size_t &off) |
| void | handleFogCreate (const std::vector< uint8_t > &b, size_t &off) |
| void | handleImageChunk (const std::vector< uint8_t > &b, size_t &off) |
| void | handleCommitBoard (const std::vector< uint8_t > &b, size_t &off) |
| void | handleCommitMarker (const std::vector< uint8_t > &b, size_t &off) |
| void | handleUserNameUpdate (const std::vector< uint8_t > &b, size_t &off) |
| void | handleFogUpdate (const std::vector< uint8_t > &b, size_t &off) |
| void | handleFogDelete (const std::vector< uint8_t > &b, size_t &off) |
| void | tryFinalizeImage (msg::ImageOwnerKind kind, uint64_t id) |
| std::vector< uint8_t > | buildSnapshotGameTableFrame (uint64_t gameTableId, const std::string &name) |
| std::vector< uint8_t > | buildSnapshotBoardFrame (const flecs::entity &board, uint64_t imageBytesTotal) |
| std::vector< uint8_t > | buildFogCreateFrame (uint64_t boardId, const flecs::entity &fog) |
| std::vector< uint8_t > | buildImageChunkFrame (uint8_t ownerKind, uint64_t id, uint64_t offset, const uint8_t *data, size_t len) |
| std::vector< uint8_t > | buildCommitBoardFrame (uint64_t boardId) |
| std::vector< unsigned char > | buildFogUpdateFrame (uint64_t boardId, const flecs::entity &fog) |
| std::vector< unsigned char > | buildFogDeleteFrame (uint64_t boardId, uint64_t fogId) |
| std::vector< unsigned char > | readFileBytes (const std::string &path) |
Static Private Member Functions | |
| static bool | tieBreakWins (const std::string &challengerPeerId, const std::string ¤tOwnerPeerId) |
| static bool | hasUrlScheme (const std::string &s) |
| static bool | ensureRemaining (const std::vector< uint8_t > &b, size_t off, size_t need) |
| static uint64_t | nowMs () |
Private Attributes | |
| std::string | customHost_ |
| std::string | decodingFromPeer_ |
| uint32_t | sendMoveMinPeriodMs_ {50} |
| std::unordered_map< uint64_t, PendingImage > | imagesRx_ |
| MessageQueue< msg::ReadyMessage > | inboundGame_ |
| std::atomic< bool > | rawWorkerRunning_ {false} |
| std::atomic< bool > | rawWorkerStop_ {false} |
| std::thread | rawWorker_ |
| std::shared_ptr< IdentityManager > | identity_manager |
| std::shared_ptr< ImGuiToaster > | toaster_ |
| std::string | myPeerId_ |
| std::string | gmPeerId_ |
| flecs::world | ecs |
| unsigned int | port = 8080 |
| char | network_password [124] = "\0" |
| std::string | external_ip_address = "" |
| std::string | local_ip_address = "" |
| Role | peer_role |
| rtc::Configuration | rtcConfig |
| std::shared_ptr< SignalingServer > | signalingServer |
| std::shared_ptr< SignalingClient > | signalingClient |
| std::unordered_map< std::string, std::shared_ptr< PeerLink > > | peers |
| std::weak_ptr< BoardManager > | board_manager |
| std::weak_ptr< GameTableManager > | gametable_manager |
Static Private Attributes | |
| static constexpr size_t | kChunk = 8 * 1024 |
| static constexpr int | kPaceEveryN = 48 |
| static constexpr int | kPaceMillis = 2 |
Definition at line 66 of file NetworkManager.h.
| NetworkManager::NetworkManager | ( | flecs::world | ecs, |
| std::shared_ptr< IdentityManager > | identity_manager ) |
Definition at line 14 of file NetworkManager.cpp.
| NetworkManager::~NetworkManager | ( | ) |
Definition at line 47 of file NetworkManager.cpp.
| void NetworkManager::allowPort | ( | unsigned int | port | ) |
| bool NetworkManager::amIDragging | ( | uint64_t | markerId | ) | const |
Definition at line 1450 of file NetworkManager.cpp.
| void NetworkManager::bootstrapPeerIfReady | ( | const std::string & | peerId | ) |
Definition at line 2550 of file NetworkManager.cpp.
| void NetworkManager::broadcastBoard | ( | const flecs::entity & | board | ) |
Definition at line 979 of file NetworkManager.cpp.
| bool NetworkManager::broadcastChatJson | ( | const msg::Json & | j | ) |
Definition at line 1074 of file NetworkManager.cpp.
| void NetworkManager::broadcastFog | ( | uint64_t | boardId, |
| const flecs::entity & | fog ) |
Definition at line 997 of file NetworkManager.cpp.
| void NetworkManager::broadcastFogDelete | ( | uint64_t | boardId, |
| const flecs::entity & | fog ) |
Definition at line 1024 of file NetworkManager.cpp.
| void NetworkManager::broadcastFogUpdate | ( | uint64_t | boardId, |
| const flecs::entity & | fog ) |
Definition at line 1017 of file NetworkManager.cpp.
| void NetworkManager::broadcastGameFrame | ( | const std::vector< unsigned char > & | frame, |
| const std::vector< std::string > & | toPeerIds ) |
Definition at line 2791 of file NetworkManager.cpp.
| void NetworkManager::broadcastGameTable | ( | const flecs::entity & | gameTable | ) |
Definition at line 970 of file NetworkManager.cpp.
| void NetworkManager::broadcastGridUpdate | ( | uint64_t | boardId, |
| const flecs::entity & | board ) |
Definition at line 1893 of file NetworkManager.cpp.
| void NetworkManager::broadcastMarker | ( | uint64_t | boardId, |
| const flecs::entity & | marker ) |
Definition at line 988 of file NetworkManager.cpp.
| void NetworkManager::broadcastMarkerDelete | ( | uint64_t | boardId, |
| const flecs::entity & | marker ) |
Definition at line 1010 of file NetworkManager.cpp.
| void NetworkManager::broadcastMarkerMove | ( | uint64_t | boardId, |
| const flecs::entity & | marker ) |
Definition at line 1387 of file NetworkManager.cpp.
| void NetworkManager::broadcastMarkerMoveState | ( | uint64_t | boardId, |
| const flecs::entity & | marker ) |
Definition at line 1421 of file NetworkManager.cpp.
| void NetworkManager::broadcastMarkerUpdate | ( | uint64_t | boardId, |
| const flecs::entity & | marker ) |
Definition at line 1380 of file NetworkManager.cpp.
| void NetworkManager::broadcastPeerDisconnect | ( | const std::string & | targetId | ) |
Definition at line 869 of file NetworkManager.cpp.
| void NetworkManager::broadcastUserNameUpdate | ( | const std::vector< uint8_t > & | payload | ) |
Definition at line 1048 of file NetworkManager.cpp.
|
private |
Definition at line 2766 of file NetworkManager.cpp.
|
private |
Definition at line 2774 of file NetworkManager.cpp.
|
private |
Definition at line 2709 of file NetworkManager.cpp.
|
private |
Definition at line 2735 of file NetworkManager.cpp.
|
private |
Definition at line 2656 of file NetworkManager.cpp.
|
private |
Definition at line 2638 of file NetworkManager.cpp.
|
private |
Definition at line 1911 of file NetworkManager.cpp.
|
private |
Definition at line 2753 of file NetworkManager.cpp.
|
private |
Definition at line 2628 of file NetworkManager.cpp.
|
private |
Definition at line 1299 of file NetworkManager.cpp.
|
private |
Definition at line 1326 of file NetworkManager.cpp.
|
private |
Definition at line 1362 of file NetworkManager.cpp.
|
private |
Definition at line 2674 of file NetworkManager.cpp.
|
private |
Definition at line 2665 of file NetworkManager.cpp.
| void NetworkManager::buildUserNameUpdate | ( | std::vector< uint8_t > & | out, |
| uint64_t | tableId, | ||
| const std::string & | userUniqueId, | ||
| const std::string & | oldUsername, | ||
| const std::string & | newUsername, | ||
| bool | reboundFlag ) const |
Definition at line 1033 of file NetworkManager.cpp.
| void NetworkManager::clearDragState | ( | uint64_t | markerId | ) |
Definition at line 963 of file NetworkManager.cpp.
|
inline |
Definition at line 121 of file NetworkManager.h.
| void NetworkManager::closeServer | ( | ) |
Definition at line 307 of file NetworkManager.cpp.
| int NetworkManager::connectedPeerCount | ( | ) | const |
Definition at line 335 of file NetworkManager.cpp.
| bool NetworkManager::connectToPeer | ( | const std::string & | connectionString | ) |
Definition at line 344 of file NetworkManager.cpp.
| std::string NetworkManager::debugIdentitySnapshot | ( | ) | const |
Definition at line 906 of file NetworkManager.cpp.
| void NetworkManager::decodeRawChatBuffer | ( | const std::string & | fromPeer, |
| const std::vector< uint8_t > & | b ) |
Definition at line 2390 of file NetworkManager.cpp.
| void NetworkManager::decodeRawGameBuffer | ( | const std::string & | fromPeer, |
| const std::vector< uint8_t > & | b ) |
Definition at line 1113 of file NetworkManager.cpp.
| void NetworkManager::decodeRawMarkerMoveBuffer | ( | const std::string & | fromPeer, |
| const std::vector< uint8_t > & | b ) |
Definition at line 1207 of file NetworkManager.cpp.
| void NetworkManager::decodeRawNotesBuffer | ( | const std::string & | fromPeer, |
| const std::vector< uint8_t > & | b ) |
Definition at line 2467 of file NetworkManager.cpp.
| void NetworkManager::disallowPort | ( | unsigned short | port | ) |
| bool NetworkManager::disconectFromPeers | ( | ) |
Definition at line 781 of file NetworkManager.cpp.
| bool NetworkManager::disconnectAllPeers | ( | ) |
Definition at line 817 of file NetworkManager.cpp.
| std::string NetworkManager::displayNameForPeer | ( | const std::string & | peerId | ) | const |
Definition at line 773 of file NetworkManager.cpp.
| void NetworkManager::drainEvents | ( | ) |
Definition at line 2173 of file NetworkManager.cpp.
| void NetworkManager::drainInboundRaw | ( | int | maxPerTick | ) |
Definition at line 2238 of file NetworkManager.cpp.
| std::shared_ptr< PeerLink > NetworkManager::ensurePeerLink | ( | const std::string & | peerId | ) |
Definition at line 632 of file NetworkManager.cpp.
|
inlinestaticprivate |
Definition at line 409 of file NetworkManager.h.
| void NetworkManager::forceCloseDrag | ( | uint64_t | markerId | ) |
Definition at line 1492 of file NetworkManager.cpp.
| std::vector< std::string > NetworkManager::getConnectedPeerIds | ( | ) | const |
Definition at line 877 of file NetworkManager.cpp.
| std::vector< std::string > NetworkManager::getConnectedUsernames | ( | ) | const |
Definition at line 891 of file NetworkManager.cpp.
|
inline |
| std::string NetworkManager::getExternalIPAddress | ( | ) |
Definition at line 374 of file NetworkManager.cpp.
|
inline |
Definition at line 229 of file NetworkManager.h.
|
inline |
Definition at line 288 of file NetworkManager.h.
| std::string NetworkManager::getLocalIPAddress | ( | ) |
Definition at line 363 of file NetworkManager.cpp.
| std::string NetworkManager::getLocalTunnelURL | ( | ) |
Definition at line 414 of file NetworkManager.cpp.
|
inline |
Definition at line 149 of file NetworkManager.h.
|
inline |
|
inline |
| std::string NetworkManager::getNetworkInfo | ( | ConnectionType | type | ) |
Definition at line 386 of file NetworkManager.cpp.
|
inline |
Definition at line 99 of file NetworkManager.h.
|
inline |
Definition at line 108 of file NetworkManager.h.
|
inline |
Definition at line 158 of file NetworkManager.h.
|
inline |
|
inline |
Definition at line 113 of file NetworkManager.h.
|
inlineprivate |
Definition at line 312 of file NetworkManager.h.
|
inline |
Definition at line 162 of file NetworkManager.h.
|
private |
Definition at line 1945 of file NetworkManager.cpp.
|
private |
Definition at line 2005 of file NetworkManager.cpp.
|
private |
Definition at line 2091 of file NetworkManager.cpp.
|
private |
Definition at line 1993 of file NetworkManager.cpp.
|
private |
Definition at line 2164 of file NetworkManager.cpp.
|
private |
Definition at line 2151 of file NetworkManager.cpp.
|
private |
Definition at line 1935 of file NetworkManager.cpp.
|
private |
Definition at line 1920 of file NetworkManager.cpp.
|
private |
Definition at line 2024 of file NetworkManager.cpp.
|
private |
Definition at line 2141 of file NetworkManager.cpp.
|
private |
Definition at line 1968 of file NetworkManager.cpp.
|
private |
Definition at line 1231 of file NetworkManager.cpp.
|
private |
Definition at line 1269 of file NetworkManager.cpp.
|
private |
Definition at line 1255 of file NetworkManager.cpp.
|
private |
Definition at line 2115 of file NetworkManager.cpp.
| bool NetworkManager::hasAnyPeer | ( | ) | const |
Definition at line 331 of file NetworkManager.cpp.
|
inlinestaticprivate |
Definition at line 402 of file NetworkManager.h.
| void NetworkManager::housekeepPeers | ( | ) |
Definition at line 678 of file NetworkManager.cpp.
| bool NetworkManager::isConnected | ( | ) |
Definition at line 318 of file NetworkManager.cpp.
| bool NetworkManager::isHosting | ( | ) | const |
Definition at line 327 of file NetworkManager.cpp.
| bool NetworkManager::isMarkerBeingDragged | ( | uint64_t | markerId | ) | const |
Definition at line 1486 of file NetworkManager.cpp.
| void NetworkManager::markDraggingLocal | ( | uint64_t | markerId, |
| bool | dragging ) |
Definition at line 1466 of file NetworkManager.cpp.
|
inlinestaticprivate |
Definition at line 433 of file NetworkManager.h.
| void NetworkManager::onPeerChannelOpen | ( | const std::string & | peerId, |
| const std::string & | label ) |
| void NetworkManager::onPeerLocalCandidate | ( | const std::string & | peerId, |
| const rtc::Candidate & | cand ) |
Definition at line 670 of file NetworkManager.cpp.
| void NetworkManager::onPeerLocalDescription | ( | const std::string & | peerId, |
| const rtc::Description & | desc ) |
Definition at line 643 of file NetworkManager.cpp.
| void NetworkManager::parseConnectionString | ( | std::string | connection_string, |
| std::string & | server, | ||
| unsigned short & | port, | ||
| std::string & | password ) |
Definition at line 419 of file NetworkManager.cpp.
|
inline |
|
inlineprivate |
Definition at line 414 of file NetworkManager.h.
| std::size_t NetworkManager::removeDisconnectedPeers | ( | ) |
Definition at line 551 of file NetworkManager.cpp.
| bool NetworkManager::removePeer | ( | std::string | peerId | ) |
Definition at line 596 of file NetworkManager.cpp.
| void NetworkManager::sendBoard | ( | const flecs::entity & | board, |
| const std::vector< std::string > & | toPeerIds ) |
Definition at line 1697 of file NetworkManager.cpp.
| bool NetworkManager::sendChatJsonTo | ( | const std::set< std::string > & | peers, |
| const msg::Json & | j ) |
Definition at line 1095 of file NetworkManager.cpp.
| bool NetworkManager::sendChatJsonTo | ( | const std::string & | peerId, |
| const msg::Json & | j ) |
Definition at line 1085 of file NetworkManager.cpp.
| void NetworkManager::sendFog | ( | uint64_t | boardId, |
| const flecs::entity & | fog, | ||
| const std::vector< std::string > & | toPeerIds ) |
Definition at line 1780 of file NetworkManager.cpp.
| void NetworkManager::sendFogDelete | ( | uint64_t | boardId, |
| const flecs::entity & | fog, | ||
| const std::vector< std::string > & | toPeerIds ) |
Definition at line 1677 of file NetworkManager.cpp.
| void NetworkManager::sendFogUpdate | ( | uint64_t | boardId, |
| const flecs::entity & | fog, | ||
| const std::vector< std::string > & | toPeerIds ) |
Definition at line 1667 of file NetworkManager.cpp.
| void NetworkManager::sendGameTable | ( | const flecs::entity & | gameTable, |
| const std::vector< std::string > & | toPeerIds ) |
Definition at line 1689 of file NetworkManager.cpp.
| void NetworkManager::sendGameTo | ( | const std::string & | peerId, |
| const std::vector< unsigned char > & | bytes ) |
Definition at line 2783 of file NetworkManager.cpp.
| void NetworkManager::sendGridUpdate | ( | uint64_t | boardId, |
| const flecs::entity & | board, | ||
| const std::vector< std::string > & | toPeerIds ) |
Definition at line 1900 of file NetworkManager.cpp.
| bool NetworkManager::sendImageChunks | ( | msg::ImageOwnerKind | kind, |
| uint64_t | id, | ||
| const std::vector< unsigned char > & | img, | ||
| const std::vector< std::string > & | toPeerIds ) |
Definition at line 1792 of file NetworkManager.cpp.
| void NetworkManager::sendMarker | ( | uint64_t | boardId, |
| const flecs::entity & | marker, | ||
| const std::vector< std::string > & | toPeerIds ) |
Definition at line 1741 of file NetworkManager.cpp.
| void NetworkManager::sendMarkerDelete | ( | uint64_t | boardId, |
| const flecs::entity & | marker, | ||
| const std::vector< std::string > & | toPeerIds ) |
Definition at line 1656 of file NetworkManager.cpp.
| void NetworkManager::sendMarkerMove | ( | uint64_t | boardId, |
| const flecs::entity & | marker, | ||
| const std::vector< std::string > & | toPeerIds ) |
Definition at line 1393 of file NetworkManager.cpp.
| void NetworkManager::sendMarkerMoveState | ( | uint64_t | boardId, |
| const flecs::entity & | marker, | ||
| const std::vector< std::string > & | toPeerIds ) |
Definition at line 1428 of file NetworkManager.cpp.
| void NetworkManager::sendMarkerUpdate | ( | uint64_t | boardId, |
| const flecs::entity & | marker, | ||
| const std::vector< std::string > & | toPeerIds ) |
Definition at line 1503 of file NetworkManager.cpp.
| void NetworkManager::sendUserNameUpdateTo | ( | const std::string & | peerId, |
| const std::vector< uint8_t > & | payload ) |
Definition at line 1058 of file NetworkManager.cpp.
|
inline |
Definition at line 299 of file NetworkManager.h.
|
inline |
Definition at line 225 of file NetworkManager.h.
|
inline |
Definition at line 153 of file NetworkManager.h.
| void NetworkManager::setNetworkPassword | ( | const char * | password | ) |
Definition at line 462 of file NetworkManager.cpp.
|
inline |
|
inline |
Definition at line 208 of file NetworkManager.h.
| void NetworkManager::setup | ( | std::weak_ptr< BoardManager > | board_manager, |
| std::weak_ptr< GameTableManager > | gametable_manager ) |
Definition at line 23 of file NetworkManager.cpp.
| bool NetworkManager::shouldApplyMarkerMove | ( | const msg::ReadyMessage & | m | ) |
Definition at line 1513 of file NetworkManager.cpp.
| bool NetworkManager::shouldApplyMarkerMoveStateFinal | ( | const msg::ReadyMessage & | m | ) |
Definition at line 1607 of file NetworkManager.cpp.
| bool NetworkManager::shouldApplyMarkerMoveStateStart | ( | const msg::ReadyMessage & | m | ) |
Definition at line 1563 of file NetworkManager.cpp.
| void NetworkManager::ShowPortForwardingHelpPopup | ( | bool * | p_open | ) |
Definition at line 469 of file NetworkManager.cpp.
| void NetworkManager::startRawDrainWorker | ( | ) |
Definition at line 2502 of file NetworkManager.cpp.
| void NetworkManager::startServer | ( | ConnectionType | mode, |
| unsigned short | port, | ||
| bool | tryUpnp ) |
Definition at line 123 of file NetworkManager.cpp.
| void NetworkManager::startServer | ( | std::string | internal_ip_address, |
| unsigned short | port ) |
Definition at line 301 of file NetworkManager.cpp.
| void NetworkManager::stopRawDrainWorker | ( | ) |
Definition at line 2540 of file NetworkManager.cpp.
|
inlinestaticprivate |
Definition at line 327 of file NetworkManager.h.
|
private |
Definition at line 2589 of file NetworkManager.cpp.
|
inline |
|
inline |
| void NetworkManager::upsertPeerIdentityWithUnique | ( | const std::string & | peerId, |
| const std::string & | uniqueId, | ||
| const std::string & | username ) |
Definition at line 761 of file NetworkManager.cpp.
|
private |
Definition at line 399 of file NetworkManager.h.
|
private |
Definition at line 303 of file NetworkManager.h.
|
private |
Definition at line 310 of file NetworkManager.h.
| std::unordered_map<uint64_t , DragState> NetworkManager::drag_ |
Definition at line 293 of file NetworkManager.h.
|
private |
Definition at line 388 of file NetworkManager.h.
| MessageQueue<msg::NetEvent> NetworkManager::events_ |
Definition at line 219 of file NetworkManager.h.
|
private |
Definition at line 391 of file NetworkManager.h.
|
private |
Definition at line 400 of file NetworkManager.h.
|
private |
Definition at line 386 of file NetworkManager.h.
|
private |
Definition at line 347 of file NetworkManager.h.
|
private |
Definition at line 340 of file NetworkManager.h.
|
private |
Definition at line 341 of file NetworkManager.h.
| MessageQueue<msg::InboundRaw> NetworkManager::inboundRaw_ |
Definition at line 220 of file NetworkManager.h.
|
staticconstexprprivate |
Definition at line 349 of file NetworkManager.h.
|
staticconstexprprivate |
Definition at line 352 of file NetworkManager.h.
|
staticconstexprprivate |
Definition at line 353 of file NetworkManager.h.
|
private |
Definition at line 392 of file NetworkManager.h.
|
private |
Definition at line 385 of file NetworkManager.h.
|
private |
Definition at line 390 of file NetworkManager.h.
|
private |
Definition at line 393 of file NetworkManager.h.
|
private |
Definition at line 398 of file NetworkManager.h.
|
private |
Definition at line 389 of file NetworkManager.h.
|
private |
Definition at line 345 of file NetworkManager.h.
|
private |
Definition at line 343 of file NetworkManager.h.
|
private |
Definition at line 344 of file NetworkManager.h.
|
private |
Definition at line 395 of file NetworkManager.h.
|
private |
Definition at line 311 of file NetworkManager.h.
|
private |
Definition at line 397 of file NetworkManager.h.
|
private |
Definition at line 396 of file NetworkManager.h.
|
private |
Definition at line 348 of file NetworkManager.h.