Dojo
Loading...
Searching...
No Matches
Dojo.Netcode.DojoTransport Class Reference

The transport that enables Unity netcode synchronization through Nakama framework. More...

Inheritance diagram for Dojo.Netcode.DojoTransport:

Public Member Functions

override void Send (ulong clientId, ArraySegment< byte > payload, NetworkDelivery networkDelivery)
 Send payload to client with clientId.
 
override NetworkEvent PollEvent (out ulong clientId, out ArraySegment< byte > payload, out float receiveTime)
 Poll event override (not used)
 
override bool StartClient ()
 Transport starts local client connection.
 
override bool StartServer ()
 Transport starts local server.
 
override void DisconnectRemoteClient (ulong clientId)
 Disconnect remote client from server
Not enabled in Dojo.
 
override void DisconnectLocalClient ()
 Disconnect local client from server
Not enabled in Dojo.
 
override ulong GetCurrentRtt (ulong clientId)
 Get current RTT between server and client with clientId.
 
override void Shutdown ()
 Shutdown transport and clean up.
 
override void Initialize (NetworkManager networkManager=null)
 Initialize transport and internal states.
 
bool GetUserByNetcodeID (ulong netcodeId, out IUserPresence presence)
 Get user presence by netcodeId
netcodeId is assigned by NetworkManager.
 
bool GetNetcodeIDByUser (IUserPresence presence, out ulong netcodeId)
 Get netcodeId by user presence
netcodeId is assigned by NetworkManager.
 

Properties

override ulong ServerClientId [get]
 Default server clientId in Netcode transport.
 

Detailed Description

The transport that enables Unity netcode synchronization through Nakama framework.

See also
Discussion about client IDs in NetworkManager

Member Function Documentation

◆ DisconnectRemoteClient()

override void Dojo.Netcode.DojoTransport.DisconnectRemoteClient ( ulong  clientId)
inline

Disconnect remote client from server
Not enabled in Dojo.

Parameters
clientIdremote client identifier

◆ GetCurrentRtt()

override ulong Dojo.Netcode.DojoTransport.GetCurrentRtt ( ulong  clientId)
inline

Get current RTT between server and client with clientId.

Parameters
clientIdclient identifier
Returns
RTT in milliseconds

◆ GetNetcodeIDByUser()

bool Dojo.Netcode.DojoTransport.GetNetcodeIDByUser ( IUserPresence  presence,
out ulong  netcodeId 
)
inline

Get netcodeId by user presence
netcodeId is assigned by NetworkManager.

Parameters
presenceuser presence in Nakama
netcodeIdreturn unique user identifier
Returns
user is found or not

◆ GetUserByNetcodeID()

bool Dojo.Netcode.DojoTransport.GetUserByNetcodeID ( ulong  netcodeId,
out IUserPresence  presence 
)
inline

Get user presence by netcodeId
netcodeId is assigned by NetworkManager.

Parameters
netcodeIdunique user identifier
presencereturn user presence in Nakama
Returns
user is found or not

◆ Initialize()

override void Dojo.Netcode.DojoTransport.Initialize ( NetworkManager  networkManager = null)
inline

Initialize transport and internal states.

Parameters
networkManagercurrent NetworkManager

◆ PollEvent()

override NetworkEvent Dojo.Netcode.DojoTransport.PollEvent ( out ulong  clientId,
out ArraySegment< byte >  payload,
out float  receiveTime 
)
inline

Poll event override (not used)

Parameters
clientIdclient identifier
payloadmessage in bytes
receiveTimemessage received time
Returns
NetworkEvent data

◆ Send()

override void Dojo.Netcode.DojoTransport.Send ( ulong  clientId,
ArraySegment< byte >  payload,
NetworkDelivery  networkDelivery 
)
inline

Send payload to client with clientId.

Parameters
clientIdclient identifier
payloadmessage in bytes
networkDeliverydelivery type

◆ StartClient()

override bool Dojo.Netcode.DojoTransport.StartClient ( )
inline

Transport starts local client connection.

Returns
success or not

◆ StartServer()

override bool Dojo.Netcode.DojoTransport.StartServer ( )
inline

Transport starts local server.

Returns
success or not

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