Skip to main content

Unity.Netcode.UnityTransport

Inheritance#

System.Dynamic.ExpandoObject

System.Dynamic.ExpandoObject

Implements#

INetworkStreamDriverConstructor

Namespace: System.Dynamic.ExpandoObject#
Assembly: MLAPI.dll#
Syntax#
public class UnityTransport : NetworkTransport, INetworkStreamDriverConstructor

ConnectionData#

Declaration#

public UnityTransport.ConnectionAddressData ConnectionData

Field Value#

TypeDescription
UnityTransport.ConnectionAddressData

InitialBatchQueueSize#

Declaration#

public const int InitialBatchQueueSize = 6144

Field Value#

TypeDescription
System.Int32

InitialMaxPacketSize#

Declaration#

public const int InitialMaxPacketSize = default(int)

Field Value#

TypeDescription
System.Int32

s_DriverConstructor#

Declaration#

public static INetworkStreamDriverConstructor s_DriverConstructor

Field Value#

TypeDescription
INetworkStreamDriverConstructor

#

DriverConstructor#

Declaration#

public INetworkStreamDriverConstructor DriverConstructor { get; }

Property Value#

TypeDescription
INetworkStreamDriverConstructor

Protocol#

Declaration#

public UnityTransport.ProtocolType Protocol { get; }

Property Value#

TypeDescription
UnityTransport.ProtocolType

ServerClientId#

Declaration#

public override ulong ServerClientId { get; }

Property Value#

TypeDescription
System.UInt64

#

CreateDriver(UnityTransport, out NetworkDriver, out NetworkPipeline, out NetworkPipeline, out NetworkPipeline)#

Declaration#

public void CreateDriver(UnityTransport transport, out NetworkDriver driver, out NetworkPipeline unreliableSequencedPipeline, out NetworkPipeline reliableSequencedPipeline, out NetworkPipeline reliableSequencedFragmentedPipeline)

Parameters#

TypeNameDescription
UnityTransporttransport
NetworkDriverdriver
NetworkPipelineunreliableSequencedPipeline
NetworkPipelinereliableSequencedPipeline
NetworkPipelinereliableSequencedFragmentedPipeline

DisconnectLocalClient()#

Declaration#

public override void DisconnectLocalClient()

DisconnectRemoteClient(UInt64)#

Declaration#

public override void DisconnectRemoteClient(ulong clientId)

Parameters#

TypeNameDescription
System.UInt64clientId

GetCurrentRtt(UInt64)#

Declaration#

public override ulong GetCurrentRtt(ulong clientId)

Parameters#

TypeNameDescription
System.UInt64clientId

Returns#

TypeDescription
System.UInt64

Initialize()#

Declaration#

public override void Initialize()

PollEvent(out UInt64, out ArraySegment\<Byte>, out Single)#

Declaration#

public override NetworkEvent PollEvent(out ulong clientId, out ArraySegment<byte> payload, out float receiveTime)

Parameters#

TypeNameDescription
System.UInt64clientId
System.ArraySegment\<System.Byte>payload
System.SinglereceiveTime

Returns#

TypeDescription
NetworkEvent

Send(UInt64, ArraySegment\<Byte>, NetworkDelivery)#

Declaration#

public override void Send(ulong clientId, ArraySegment<byte> payload, NetworkDelivery networkDelivery)

Parameters#

TypeNameDescription
System.UInt64clientId
System.ArraySegment\<System.Byte>payload
NetworkDeliverynetworkDelivery

SetConnectionData(NetworkEndPoint)#

Sets IP and Port information. This will be ignored if using the Unity Relay and you should call SetRelayServerData(String, UInt16, Byte[], Byte[], Byte[], Byte[], Boolean)

Declaration#

public void SetConnectionData(NetworkEndPoint endPoint)

Parameters#

TypeNameDescription
NetworkEndPointendPoint

SetConnectionData(String, UInt16)#

Sets IP and Port information. This will be ignored if using the Unity Relay and you should call SetRelayServerData(String, UInt16, Byte[], Byte[], Byte[], Byte[], Boolean)

Declaration#

public void SetConnectionData(string ipv4Address, ushort port)

Parameters#

TypeNameDescription
System.Stringipv4Address
System.UInt16port

SetRelayServerData(String, UInt16, Byte[], Byte[], Byte[], Byte[], Boolean)#

Declaration#

public void SetRelayServerData(string ipv4Address, ushort port, byte[] allocationIdBytes, byte[] keyBytes, byte[] connectionDataBytes, byte[] hostConnectionDataBytes = null, bool isSecure = false)

Parameters#

TypeNameDescription
System.Stringipv4Address
System.UInt16port
System.Byte[]allocationIdBytes
System.Byte[]keyBytes
System.Byte[]connectionDataBytes
System.Byte[]hostConnectionDataBytes
System.BooleanisSecure

Shutdown()#

Declaration#

public override void Shutdown()

StartClient()#

Declaration#

public override bool StartClient()

Returns#

TypeDescription
System.Boolean

StartServer()#

Declaration#

public override bool StartServer()

Returns#

TypeDescription
System.Boolean

Implements#

INetworkStreamDriverConstructor