Class NetworkTransport
The generic transport class all Netcode for GameObjects network transport implementations derive from. Use this class to add a custom transport. for an example of how a transport is integrated
Inherited Members
Namespace: Unity.Netcode
Assembly: solution.dll
Syntax
public abstract class NetworkTransport : MonoBehaviour
Properties
Name | Description |
---|---|
Is |
Gets a value indicating whether this Network |
Server |
A constant |
Methods
Name | Description |
---|---|
Disconnect |
Disconnects the local client from the server |
Disconnect |
Disconnects a client from the server |
Get |
Gets the round trip time for a specific client. This method is optional |
Initialize(Network |
Initializes the transport |
Invoke |
Invokes the On |
Poll |
Polls for incoming events, with an extra output parameter to report the precise time the event was received. |
Send(ulong, Array |
Send a payload to the specified clientId, data and networkDelivery. |
Shutdown() | Shuts down the transport |
Start |
Connects client to the server |
Start |
Starts to listening for incoming clients |
Events
Name | Description |
---|---|
On |
Occurs when the transport has a new transport network event. Can be used to make an event based transport instead of a poll based. Invocation has to occur on the Unity thread in the Update loop. |