The transport that enables Unity netcode synchronization through Nakama framework.
More...
|
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.
|
|
|
override ulong | ServerClientId [get] |
| Default server clientId in Netcode transport.
|
|
The transport that enables Unity netcode synchronization through Nakama framework.
- See also
- Discussion about client IDs in NetworkManager
◆ DisconnectRemoteClient()
override void Dojo.Netcode.DojoTransport.DisconnectRemoteClient |
( |
ulong |
clientId | ) |
|
|
inline |
Disconnect remote client from server
Not enabled in Dojo.
- Parameters
-
clientId | remote client identifier |
◆ GetCurrentRtt()
override ulong Dojo.Netcode.DojoTransport.GetCurrentRtt |
( |
ulong |
clientId | ) |
|
|
inline |
Get current RTT between server and client with clientId
.
- Parameters
-
clientId | client 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
-
presence | user presence in Nakama |
netcodeId | return 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
-
netcodeId | unique user identifier |
presence | return 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
-
networkManager | current 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
-
clientId | client identifier |
payload | message in bytes |
receiveTime | message 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
-
clientId | client identifier |
payload | message in bytes |
networkDelivery | delivery 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:
- Unity/Assets/Dojo/Netcode/DojoTransport.cs