Show / Hide Table of Contents

Class NetworkTransport

Inheritance
Object
NetworkTransport
Inherited Members
Object.ToString()
Object.Equals(Object)
Object.Equals(Object, Object)
Object.ReferenceEquals(Object, Object)
Object.GetHashCode()
Object.GetType()
Object.MemberwiseClone()
Namespace: UnityEngine.Networking
Assembly: UnityEngine.dll
Syntax
[Obsolete("The UNET transport will be removed in the future as soon a replacement is ready.")]
public sealed class NetworkTransport

Properties

| Improve this Doc View Source

IsStarted

Declaration
public static bool IsStarted { get; }
Property Value
Type Description
Boolean

Methods

| Improve this Doc View Source

AddHost(HostTopology)

Declaration
public static int AddHost(HostTopology topology)
Parameters
Type Name Description
HostTopology topology
Returns
Type Description
Int32
| Improve this Doc View Source

AddHost(HostTopology, Int32)

Declaration
public static int AddHost(HostTopology topology, int port)
Parameters
Type Name Description
HostTopology topology
Int32 port
Returns
Type Description
Int32
| Improve this Doc View Source

AddHost(HostTopology, Int32, String)

Declaration
public static int AddHost(HostTopology topology, int port, string ip)
Parameters
Type Name Description
HostTopology topology
Int32 port
String ip
Returns
Type Description
Int32
| Improve this Doc View Source

AddHostWithSimulator(HostTopology, Int32, Int32)

Declaration
public static int AddHostWithSimulator(HostTopology topology, int minTimeout, int maxTimeout)
Parameters
Type Name Description
HostTopology topology
Int32 minTimeout
Int32 maxTimeout
Returns
Type Description
Int32
| Improve this Doc View Source

AddHostWithSimulator(HostTopology, Int32, Int32, Int32)

Declaration
public static int AddHostWithSimulator(HostTopology topology, int minTimeout, int maxTimeout, int port)
Parameters
Type Name Description
HostTopology topology
Int32 minTimeout
Int32 maxTimeout
Int32 port
Returns
Type Description
Int32
| Improve this Doc View Source

AddHostWithSimulator(HostTopology, Int32, Int32, Int32, String)

Declaration
public static int AddHostWithSimulator(HostTopology topology, int minTimeout, int maxTimeout, int port, string ip)
Parameters
Type Name Description
HostTopology topology
Int32 minTimeout
Int32 maxTimeout
Int32 port
String ip
Returns
Type Description
Int32
| Improve this Doc View Source

AddSceneId(Int32)

Declaration
public static void AddSceneId(int id)
Parameters
Type Name Description
Int32 id
| Improve this Doc View Source

AddWebsocketHost(HostTopology, Int32)

Declaration
public static int AddWebsocketHost(HostTopology topology, int port)
Parameters
Type Name Description
HostTopology topology
Int32 port
Returns
Type Description
Int32
| Improve this Doc View Source

AddWebsocketHost(HostTopology, Int32, String)

Declaration
public static int AddWebsocketHost(HostTopology topology, int port, string ip)
Parameters
Type Name Description
HostTopology topology
Int32 port
String ip
Returns
Type Description
Int32

Connect(Int32, String, Int32, Int32, out Byte)

Declaration
public static int Connect(int hostId, string address, int port, int exeptionConnectionId, out byte error)
Parameters
Type Name Description
Int32 hostId
String address
Int32 port
Int32 exeptionConnectionId
Byte error
Returns
Type Description
Int32
| Improve this Doc View Source

ConnectAsNetworkHost(Int32, String, Int32, NetworkID, SourceID, NodeID, out Byte)

Declaration
public static void ConnectAsNetworkHost(int hostId, string address, int port, NetworkID network, SourceID source, NodeID node, out byte error)
Parameters
Type Name Description
Int32 hostId
String address
Int32 port
NetworkID network
SourceID source
NodeID node
Byte error
| Improve this Doc View Source

ConnectEndPoint(Int32, EndPoint, Int32, out Byte)

Declaration
public static int ConnectEndPoint(int hostId, EndPoint endPoint, int exceptionConnectionId, out byte error)
Parameters
Type Name Description
Int32 hostId
EndPoint endPoint
Int32 exceptionConnectionId
Byte error
Returns
Type Description
Int32
| Improve this Doc View Source

ConnectToNetworkPeer(Int32, String, Int32, Int32, Int32, NetworkID, SourceID, NodeID, out Byte)

Declaration
public static int ConnectToNetworkPeer(int hostId, string address, int port, int exceptionConnectionId, int relaySlotId, NetworkID network, SourceID source, NodeID node, out byte error)
Parameters
Type Name Description
Int32 hostId
String address
Int32 port
Int32 exceptionConnectionId
Int32 relaySlotId
NetworkID network
SourceID source
NodeID node
Byte error
Returns
Type Description
Int32
| Improve this Doc View Source

ConnectToNetworkPeer(Int32, String, Int32, Int32, Int32, NetworkID, SourceID, NodeID, Int32, Single, out Byte)

Declaration
public static int ConnectToNetworkPeer(int hostId, string address, int port, int exceptionConnectionId, int relaySlotId, NetworkID network, SourceID source, NodeID node, int bytesPerSec, float bucketSizeFactor, out byte error)
Parameters
Type Name Description
Int32 hostId
String address
Int32 port
Int32 exceptionConnectionId
Int32 relaySlotId
NetworkID network
SourceID source
NodeID node
Int32 bytesPerSec
Single bucketSizeFactor
Byte error
Returns
Type Description
Int32
| Improve this Doc View Source

ConnectWithSimulator(Int32, String, Int32, Int32, out Byte, ConnectionSimulatorConfig)

Declaration
public static int ConnectWithSimulator(int hostId, string address, int port, int exeptionConnectionId, out byte error, ConnectionSimulatorConfig conf)
Parameters
Type Name Description
Int32 hostId
String address
Int32 port
Int32 exeptionConnectionId
Byte error
ConnectionSimulatorConfig conf
Returns
Type Description
Int32

Disconnect(Int32, Int32, out Byte)

Declaration
public static bool Disconnect(int hostId, int connectionId, out byte error)
Parameters
Type Name Description
Int32 hostId
Int32 connectionId
Byte error
Returns
Type Description
Boolean

DisconnectNetworkHost(Int32, out Byte)

Declaration
public static void DisconnectNetworkHost(int hostId, out byte error)
Parameters
Type Name Description
Int32 hostId
Byte error

FinishSendMulticast(Int32, out Byte)

Declaration
public static bool FinishSendMulticast(int hostId, out byte error)
Parameters
Type Name Description
Int32 hostId
Byte error
Returns
Type Description
Boolean

GetAckBufferCount(Int32, Int32, out Byte)

Declaration
public static int GetAckBufferCount(int hostId, int connectionId, out byte error)
Parameters
Type Name Description
Int32 hostId
Int32 connectionId
Byte error
Returns
Type Description
Int32
| Improve this Doc View Source

GetAssetId(GameObject)

Declaration
[Obsolete("This function has been deprecated. Use AssetDatabase utilities instead.")]
public static string GetAssetId(GameObject go)
Parameters
Type Name Description
GameObject go
Returns
Type Description
String

GetBroadcastConnectionInfo(Int32, out Int32, out Byte)

Declaration
public static string GetBroadcastConnectionInfo(int hostId, out int port, out byte error)
Parameters
Type Name Description
Int32 hostId
Int32 port
Byte error
Returns
Type Description
String
| Improve this Doc View Source

GetBroadcastConnectionInfo(Int32, out String, out Int32, out Byte)

Declaration
public static void GetBroadcastConnectionInfo(int hostId, out string address, out int port, out byte error)
Parameters
Type Name Description
Int32 hostId
String address
Int32 port
Byte error
| Improve this Doc View Source

GetBroadcastConnectionMessage(Int32, Byte[], Int32, out Int32, out Byte)

Declaration
public static void GetBroadcastConnectionMessage(int hostId, byte[] buffer, int bufferSize, out int receivedSize, out byte error)
Parameters
Type Name Description
Int32 hostId
Byte[] buffer
Int32 bufferSize
Int32 receivedSize
Byte error

GetConnectionInfo(Int32, Int32, out Int32, out UInt64, out UInt16, out Byte)

Declaration
public static string GetConnectionInfo(int hostId, int connectionId, out int port, out ulong network, out ushort dstNode, out byte error)
Parameters
Type Name Description
Int32 hostId
Int32 connectionId
Int32 port
UInt64 network
UInt16 dstNode
Byte error
Returns
Type Description
String
| Improve this Doc View Source

GetConnectionInfo(Int32, Int32, out String, out Int32, out NetworkID, out NodeID, out Byte)

Declaration
public static void GetConnectionInfo(int hostId, int connectionId, out string address, out int port, out NetworkID network, out NodeID dstNode, out byte error)
Parameters
Type Name Description
Int32 hostId
Int32 connectionId
String address
Int32 port
NetworkID network
NodeID dstNode
Byte error
| Improve this Doc View Source

GetCurrentIncomingMessageAmount()

Declaration
[Obsolete("GetCurrentIncomingMessageAmount has been deprecated.")]
public static int GetCurrentIncomingMessageAmount()
Returns
Type Description
Int32
| Improve this Doc View Source

GetCurrentOutgoingMessageAmount()

Declaration
[Obsolete("GetCurrentOutgoingMessageAmount has been deprecated.")]
public static int GetCurrentOutgoingMessageAmount()
Returns
Type Description
Int32
| Improve this Doc View Source

GetCurrentRtt(Int32, Int32, out Byte)

Declaration
[Obsolete("GetCurrentRtt() has been deprecated.")]
public static int GetCurrentRtt(int hostId, int connectionId, out byte error)
Parameters
Type Name Description
Int32 hostId
Int32 connectionId
Byte error
Returns
Type Description
Int32

GetCurrentRTT(Int32, Int32, out Byte)

Declaration
public static int GetCurrentRTT(int hostId, int connectionId, out byte error)
Parameters
Type Name Description
Int32 hostId
Int32 connectionId
Byte error
Returns
Type Description
Int32

GetHostPort(Int32)

Declaration
public static int GetHostPort(int hostId)
Parameters
Type Name Description
Int32 hostId
Returns
Type Description
Int32

GetIncomingMessageQueueSize(Int32, out Byte)

Declaration
public static int GetIncomingMessageQueueSize(int hostId, out byte error)
Parameters
Type Name Description
Int32 hostId
Byte error
Returns
Type Description
Int32

GetIncomingPacketCount(Int32, Int32, out Byte)

Declaration
public static int GetIncomingPacketCount(int hostId, int connectionId, out byte error)
Parameters
Type Name Description
Int32 hostId
Int32 connectionId
Byte error
Returns
Type Description
Int32

GetIncomingPacketCountForAllHosts()

Declaration
public static int GetIncomingPacketCountForAllHosts()
Returns
Type Description
Int32

GetIncomingPacketDropCountForAllHosts()

Declaration
public static int GetIncomingPacketDropCountForAllHosts()
Returns
Type Description
Int32

GetIncomingPacketLossCount(Int32, Int32, out Byte)

Declaration
public static int GetIncomingPacketLossCount(int hostId, int connectionId, out byte error)
Parameters
Type Name Description
Int32 hostId
Int32 connectionId
Byte error
Returns
Type Description
Int32

GetMaxAllowedBandwidth(Int32, Int32, out Byte)

Declaration
public static int GetMaxAllowedBandwidth(int hostId, int connectionId, out byte error)
Parameters
Type Name Description
Int32 hostId
Int32 connectionId
Byte error
Returns
Type Description
Int32
| Improve this Doc View Source

GetNetIOTimeuS()

Declaration
[Obsolete("GetNetIOTimeuS has been deprecated.")]
public static int GetNetIOTimeuS()
Returns
Type Description
Int32
| Improve this Doc View Source

GetNetworkLostPacketNum(Int32, Int32, out Byte)

Declaration
[Obsolete("GetNetworkLostPacketNum() has been deprecated.")]
public static int GetNetworkLostPacketNum(int hostId, int connectionId, out byte error)
Parameters
Type Name Description
Int32 hostId
Int32 connectionId
Byte error
Returns
Type Description
Int32

GetNetworkTimestamp()

Declaration
public static int GetNetworkTimestamp()
Returns
Type Description
Int32
| Improve this Doc View Source

GetNextSceneId()

Declaration
public static int GetNextSceneId()
Returns
Type Description
Int32

GetOutgoingFullBytesCount()

Declaration
public static int GetOutgoingFullBytesCount()
Returns
Type Description
Int32

GetOutgoingFullBytesCountForConnection(Int32, Int32, out Byte)

Declaration
public static int GetOutgoingFullBytesCountForConnection(int hostId, int connectionId, out byte error)
Parameters
Type Name Description
Int32 hostId
Int32 connectionId
Byte error
Returns
Type Description
Int32

GetOutgoingFullBytesCountForHost(Int32, out Byte)

Declaration
public static int GetOutgoingFullBytesCountForHost(int hostId, out byte error)
Parameters
Type Name Description
Int32 hostId
Byte error
Returns
Type Description
Int32

GetOutgoingMessageCount()

Declaration
public static int GetOutgoingMessageCount()
Returns
Type Description
Int32

GetOutgoingMessageCountForConnection(Int32, Int32, out Byte)

Declaration
public static int GetOutgoingMessageCountForConnection(int hostId, int connectionId, out byte error)
Parameters
Type Name Description
Int32 hostId
Int32 connectionId
Byte error
Returns
Type Description
Int32

GetOutgoingMessageCountForHost(Int32, out Byte)

Declaration
public static int GetOutgoingMessageCountForHost(int hostId, out byte error)
Parameters
Type Name Description
Int32 hostId
Byte error
Returns
Type Description
Int32

GetOutgoingMessageQueueSize(Int32, out Byte)

Declaration
public static int GetOutgoingMessageQueueSize(int hostId, out byte error)
Parameters
Type Name Description
Int32 hostId
Byte error
Returns
Type Description
Int32

GetOutgoingPacketCount()

Declaration
public static int GetOutgoingPacketCount()
Returns
Type Description
Int32

GetOutgoingPacketCountForConnection(Int32, Int32, out Byte)

Declaration
public static int GetOutgoingPacketCountForConnection(int hostId, int connectionId, out byte error)
Parameters
Type Name Description
Int32 hostId
Int32 connectionId
Byte error
Returns
Type Description
Int32

GetOutgoingPacketCountForHost(Int32, out Byte)

Declaration
public static int GetOutgoingPacketCountForHost(int hostId, out byte error)
Parameters
Type Name Description
Int32 hostId
Byte error
Returns
Type Description
Int32

GetOutgoingPacketNetworkLossPercent(Int32, Int32, out Byte)

Declaration
public static int GetOutgoingPacketNetworkLossPercent(int hostId, int connectionId, out byte error)
Parameters
Type Name Description
Int32 hostId
Int32 connectionId
Byte error
Returns
Type Description
Int32

GetOutgoingPacketOverflowLossPercent(Int32, Int32, out Byte)

Declaration
public static int GetOutgoingPacketOverflowLossPercent(int hostId, int connectionId, out byte error)
Parameters
Type Name Description
Int32 hostId
Int32 connectionId
Byte error
Returns
Type Description
Int32

GetOutgoingSystemBytesCount()

Declaration
public static int GetOutgoingSystemBytesCount()
Returns
Type Description
Int32

GetOutgoingSystemBytesCountForConnection(Int32, Int32, out Byte)

Declaration
public static int GetOutgoingSystemBytesCountForConnection(int hostId, int connectionId, out byte error)
Parameters
Type Name Description
Int32 hostId
Int32 connectionId
Byte error
Returns
Type Description
Int32

GetOutgoingSystemBytesCountForHost(Int32, out Byte)

Declaration
public static int GetOutgoingSystemBytesCountForHost(int hostId, out byte error)
Parameters
Type Name Description
Int32 hostId
Byte error
Returns
Type Description
Int32

GetOutgoingUserBytesCount()

Declaration
public static int GetOutgoingUserBytesCount()
Returns
Type Description
Int32

GetOutgoingUserBytesCountForConnection(Int32, Int32, out Byte)

Declaration
public static int GetOutgoingUserBytesCountForConnection(int hostId, int connectionId, out byte error)
Parameters
Type Name Description
Int32 hostId
Int32 connectionId
Byte error
Returns
Type Description
Int32

GetOutgoingUserBytesCountForHost(Int32, out Byte)

Declaration
public static int GetOutgoingUserBytesCountForHost(int hostId, out byte error)
Parameters
Type Name Description
Int32 hostId
Byte error
Returns
Type Description
Int32
| Improve this Doc View Source

GetPacketReceivedRate(Int32, Int32, out Byte)

Declaration
[Obsolete("GetPacketReceivedRate has been deprecated.")]
public static int GetPacketReceivedRate(int hostId, int connectionId, out byte error)
Parameters
Type Name Description
Int32 hostId
Int32 connectionId
Byte error
Returns
Type Description
Int32
| Improve this Doc View Source

GetPacketSentRate(Int32, Int32, out Byte)

Declaration
[Obsolete("GetPacketSentRate has been deprecated.")]
public static int GetPacketSentRate(int hostId, int connectionId, out byte error)
Parameters
Type Name Description
Int32 hostId
Int32 connectionId
Byte error
Returns
Type Description
Int32

GetRemoteDelayTimeMS(Int32, Int32, Int32, out Byte)

Declaration
public static int GetRemoteDelayTimeMS(int hostId, int connectionId, int remoteTime, out byte error)
Parameters
Type Name Description
Int32 hostId
Int32 connectionId
Int32 remoteTime
Byte error
Returns
Type Description
Int32
| Improve this Doc View Source

GetRemotePacketReceivedRate(Int32, Int32, out Byte)

Declaration
[Obsolete("GetRemotePacketReceivedRate has been deprecated.")]
public static int GetRemotePacketReceivedRate(int hostId, int connectionId, out byte error)
Parameters
Type Name Description
Int32 hostId
Int32 connectionId
Byte error
Returns
Type Description
Int32
| Improve this Doc View Source

Init()

Declaration
public static void Init()
| Improve this Doc View Source

Init(GlobalConfig)

Declaration
public static void Init(GlobalConfig config)
Parameters
Type Name Description
GlobalConfig config

IsBroadcastDiscoveryRunning()

Declaration
public static bool IsBroadcastDiscoveryRunning()
Returns
Type Description
Boolean

NotifyWhenConnectionReadyForSend(Int32, Int32, Int32, out Byte)

Declaration
public static bool NotifyWhenConnectionReadyForSend(int hostId, int connectionId, int notificationLevel, out byte error)
Parameters
Type Name Description
Int32 hostId
Int32 connectionId
Int32 notificationLevel
Byte error
Returns
Type Description
Boolean
| Improve this Doc View Source

QueueMessageForSending(Int32, Int32, Int32, Byte[], Int32, out Byte)

Declaration
public static bool QueueMessageForSending(int hostId, int connectionId, int channelId, byte[] buffer, int size, out byte error)
Parameters
Type Name Description
Int32 hostId
Int32 connectionId
Int32 channelId
Byte[] buffer
Int32 size
Byte error
Returns
Type Description
Boolean
| Improve this Doc View Source

Receive(out Int32, out Int32, out Int32, Byte[], Int32, out Int32, out Byte)

Declaration
public static NetworkEventType Receive(out int hostId, out int connectionId, out int channelId, byte[] buffer, int bufferSize, out int receivedSize, out byte error)
Parameters
Type Name Description
Int32 hostId
Int32 connectionId
Int32 channelId
Byte[] buffer
Int32 bufferSize
Int32 receivedSize
Byte error
Returns
Type Description
NetworkEventType
| Improve this Doc View Source

ReceiveFromHost(Int32, out Int32, out Int32, Byte[], Int32, out Int32, out Byte)

Declaration
public static NetworkEventType ReceiveFromHost(int hostId, out int connectionId, out int channelId, byte[] buffer, int bufferSize, out int receivedSize, out byte error)
Parameters
Type Name Description
Int32 hostId
Int32 connectionId
Int32 channelId
Byte[] buffer
Int32 bufferSize
Int32 receivedSize
Byte error
Returns
Type Description
NetworkEventType
| Improve this Doc View Source

ReceiveRelayEventFromHost(Int32, out Byte)

Declaration
public static NetworkEventType ReceiveRelayEventFromHost(int hostId, out byte error)
Parameters
Type Name Description
Int32 hostId
Byte error
Returns
Type Description
NetworkEventType

RemoveHost(Int32)

Declaration
public static bool RemoveHost(int hostId)
Parameters
Type Name Description
Int32 hostId
Returns
Type Description
Boolean
| Improve this Doc View Source

Send(Int32, Int32, Int32, Byte[], Int32, out Byte)

Declaration
public static bool Send(int hostId, int connectionId, int channelId, byte[] buffer, int size, out byte error)
Parameters
Type Name Description
Int32 hostId
Int32 connectionId
Int32 channelId
Byte[] buffer
Int32 size
Byte error
Returns
Type Description
Boolean

SendMulticast(Int32, Int32, out Byte)

Declaration
public static bool SendMulticast(int hostId, int connectionId, out byte error)
Parameters
Type Name Description
Int32 hostId
Int32 connectionId
Byte error
Returns
Type Description
Boolean

SendQueuedMessages(Int32, Int32, out Byte)

Declaration
public static bool SendQueuedMessages(int hostId, int connectionId, out byte error)
Parameters
Type Name Description
Int32 hostId
Int32 connectionId
Byte error
Returns
Type Description
Boolean

SetBroadcastCredentials(Int32, Int32, Int32, Int32, out Byte)

Declaration
public static void SetBroadcastCredentials(int hostId, int key, int version, int subversion, out byte error)
Parameters
Type Name Description
Int32 hostId
Int32 key
Int32 version
Int32 subversion
Byte error

SetPacketStat(Int32, Int32, Int32, Int32)

Declaration
public static void SetPacketStat(int direction, int packetStatId, int numMsgs, int numBytes)
Parameters
Type Name Description
Int32 direction
Int32 packetStatId
Int32 numMsgs
Int32 numBytes
| Improve this Doc View Source

Shutdown()

Declaration
public static void Shutdown()
| Improve this Doc View Source

StartBroadcastDiscovery(Int32, Int32, Int32, Int32, Int32, Byte[], Int32, Int32, out Byte)

Declaration
public static bool StartBroadcastDiscovery(int hostId, int broadcastPort, int key, int version, int subversion, byte[] buffer, int size, int timeout, out byte error)
Parameters
Type Name Description
Int32 hostId
Int32 broadcastPort
Int32 key
Int32 version
Int32 subversion
Byte[] buffer
Int32 size
Int32 timeout
Byte error
Returns
Type Description
Boolean
| Improve this Doc View Source

StartSendMulticast(Int32, Int32, Byte[], Int32, out Byte)

Declaration
public static bool StartSendMulticast(int hostId, int channelId, byte[] buffer, int size, out byte error)
Parameters
Type Name Description
Int32 hostId
Int32 channelId
Byte[] buffer
Int32 size
Byte error
Returns
Type Description
Boolean

StopBroadcastDiscovery()

Declaration
public static void StopBroadcastDiscovery()

Extension Methods

MustExtensions.MustBeEqual<T>(T, T)
MustExtensions.MustBeEqual<T>(T, T, String)
MustExtensions.MustNotBeEqual<T>(T, T)
MustExtensions.MustNotBeEqual<T>(T, T, String)
MustExtensions.MustBeNull<T>(T)
MustExtensions.MustBeNull<T>(T, String)
MustExtensions.MustNotBeNull<T>(T)
MustExtensions.MustNotBeNull<T>(T, String)
  • Improve this Doc
  • View Source
Back to top Generated by DocFX