Elaztek Developer Hub
Blamite Game Engine - blam!  00406.12.10.23.1457.blamite
The core library for the Blamite Game Engine.
discord::NetworkManager Class Referencefinal

#include <network_manager.h>

+ Collaboration diagram for discord::NetworkManager:

Public Member Functions

 ~NetworkManager ()=default
 
void GetPeerId (NetworkPeerId *peerId)
 Get the local peer ID for this process. More...
 
Result Flush ()
 Send pending network messages. More...
 
Result OpenPeer (NetworkPeerId peerId, char const *routeData)
 Open a connection to a remote peer. More...
 
Result UpdatePeer (NetworkPeerId peerId, char const *routeData)
 Update the route data for a connected peer. More...
 
Result ClosePeer (NetworkPeerId peerId)
 Close the connection to a remote peer. More...
 
Result OpenChannel (NetworkPeerId peerId, NetworkChannelId channelId, bool reliable)
 Open a message channel to a connected peer. More...
 
Result CloseChannel (NetworkPeerId peerId, NetworkChannelId channelId)
 Close a message channel to a connected peer. More...
 
Result SendMessage (NetworkPeerId peerId, NetworkChannelId channelId, std::uint8_t *data, std::uint32_t dataLength)
 Send a message to a connected peer over an opened message channel. More...
 

Public Attributes

Event< NetworkPeerId, NetworkChannelId, std::uint8_t *, std::uint32_tOnMessage
 
Event< char const * > OnRouteUpdate
 

Friends

class Core
 

Constructor & Destructor Documentation

◆ ~NetworkManager()

discord::NetworkManager::~NetworkManager ( )
default

Member Function Documentation

◆ CloseChannel()

Result discord::NetworkManager::CloseChannel ( NetworkPeerId  peerId,
NetworkChannelId  channelId 
)

Close a message channel to a connected peer.

◆ ClosePeer()

Result discord::NetworkManager::ClosePeer ( NetworkPeerId  peerId)

Close the connection to a remote peer.

◆ Flush()

Result discord::NetworkManager::Flush ( )

Send pending network messages.

◆ GetPeerId()

void discord::NetworkManager::GetPeerId ( NetworkPeerId peerId)

Get the local peer ID for this process.

◆ OpenChannel()

Result discord::NetworkManager::OpenChannel ( NetworkPeerId  peerId,
NetworkChannelId  channelId,
bool  reliable 
)

Open a message channel to a connected peer.

◆ OpenPeer()

Result discord::NetworkManager::OpenPeer ( NetworkPeerId  peerId,
char const *  routeData 
)

Open a connection to a remote peer.

◆ SendMessage()

Result discord::NetworkManager::SendMessage ( NetworkPeerId  peerId,
NetworkChannelId  channelId,
std::uint8_t data,
std::uint32_t  dataLength 
)

Send a message to a connected peer over an opened message channel.

◆ UpdatePeer()

Result discord::NetworkManager::UpdatePeer ( NetworkPeerId  peerId,
char const *  routeData 
)

Update the route data for a connected peer.

Friends And Related Function Documentation

◆ Core

friend class Core
friend

Member Data Documentation

◆ OnMessage

Event<NetworkPeerId, NetworkChannelId, std::uint8_t*, std::uint32_t> discord::NetworkManager::OnMessage

◆ OnRouteUpdate

Event<char const*> discord::NetworkManager::OnRouteUpdate

The documentation for this class was generated from the following files: