Class NetworkTransport
Inheritance
NetworkTransport
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
Methods
|
Improve this Doc
View Source
AddHost(HostTopology)
Declaration
public static int AddHost(HostTopology topology)
Parameters
Returns
|
Improve this Doc
View Source
AddHost(HostTopology, Int32)
Declaration
public static int AddHost(HostTopology topology, int port)
Parameters
Returns
|
Improve this Doc
View Source
AddHost(HostTopology, Int32, String)
Declaration
public static int AddHost(HostTopology topology, int port, string ip)
Parameters
Returns
|
Improve this Doc
View Source
AddHostWithSimulator(HostTopology, Int32, Int32)
Declaration
public static int AddHostWithSimulator(HostTopology topology, int minTimeout, int maxTimeout)
Parameters
Returns
|
Improve this Doc
View Source
AddHostWithSimulator(HostTopology, Int32, Int32, Int32)
Declaration
public static int AddHostWithSimulator(HostTopology topology, int minTimeout, int maxTimeout, int port)
Parameters
Returns
|
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
Returns
|
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
Returns
|
Improve this Doc
View Source
AddWebsocketHost(HostTopology, Int32, String)
Declaration
public static int AddWebsocketHost(HostTopology topology, int port, string ip)
Parameters
Returns
Connect(Int32, String, Int32, Int32, out Byte)
Declaration
public static int Connect(int hostId, string address, int port, int exeptionConnectionId, out byte error)
Parameters
Returns
|
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
|
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
Returns
|
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
Returns
|
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
Returns
|
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
Returns
Disconnect(Int32, Int32, out Byte)
Declaration
public static bool Disconnect(int hostId, int connectionId, out byte error)
Parameters
Returns
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
GetAckBufferCount(Int32, Int32, out Byte)
Declaration
public static int GetAckBufferCount(int hostId, int connectionId, out byte error)
Parameters
Returns
|
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
Returns
GetBroadcastConnectionInfo(Int32, out Int32, out Byte)
Declaration
public static string GetBroadcastConnectionInfo(int hostId, out int port, out byte error)
Parameters
Returns
|
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
|
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
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
Returns
|
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
|
Improve this Doc
View Source
GetCurrentIncomingMessageAmount()
Declaration
[Obsolete("GetCurrentIncomingMessageAmount has been deprecated.")]
public static int GetCurrentIncomingMessageAmount()
Returns
|
Improve this Doc
View Source
GetCurrentOutgoingMessageAmount()
Declaration
[Obsolete("GetCurrentOutgoingMessageAmount has been deprecated.")]
public static int GetCurrentOutgoingMessageAmount()
Returns
|
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
Returns
GetCurrentRTT(Int32, Int32, out Byte)
Declaration
public static int GetCurrentRTT(int hostId, int connectionId, out byte error)
Parameters
Returns
GetHostPort(Int32)
Declaration
public static int GetHostPort(int hostId)
Parameters
Type |
Name |
Description |
Int32 |
hostId |
|
Returns
GetIncomingMessageQueueSize(Int32, out Byte)
Declaration
public static int GetIncomingMessageQueueSize(int hostId, out byte error)
Parameters
Type |
Name |
Description |
Int32 |
hostId |
|
Byte |
error |
|
Returns
GetIncomingPacketCount(Int32, Int32, out Byte)
Declaration
public static int GetIncomingPacketCount(int hostId, int connectionId, out byte error)
Parameters
Returns
GetIncomingPacketCountForAllHosts()
Declaration
public static int GetIncomingPacketCountForAllHosts()
Returns
GetIncomingPacketDropCountForAllHosts()
Declaration
public static int GetIncomingPacketDropCountForAllHosts()
Returns
GetIncomingPacketLossCount(Int32, Int32, out Byte)
Declaration
public static int GetIncomingPacketLossCount(int hostId, int connectionId, out byte error)
Parameters
Returns
GetMaxAllowedBandwidth(Int32, Int32, out Byte)
Declaration
public static int GetMaxAllowedBandwidth(int hostId, int connectionId, out byte error)
Parameters
Returns
|
Improve this Doc
View Source
GetNetIOTimeuS()
Declaration
[Obsolete("GetNetIOTimeuS has been deprecated.")]
public static int GetNetIOTimeuS()
Returns
|
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
Returns
GetNetworkTimestamp()
Declaration
public static int GetNetworkTimestamp()
Returns
|
Improve this Doc
View Source
GetNextSceneId()
Declaration
public static int GetNextSceneId()
Returns
GetOutgoingFullBytesCount()
Declaration
public static int GetOutgoingFullBytesCount()
Returns
GetOutgoingFullBytesCountForConnection(Int32, Int32, out Byte)
Declaration
public static int GetOutgoingFullBytesCountForConnection(int hostId, int connectionId, out byte error)
Parameters
Returns
GetOutgoingFullBytesCountForHost(Int32, out Byte)
Declaration
public static int GetOutgoingFullBytesCountForHost(int hostId, out byte error)
Parameters
Type |
Name |
Description |
Int32 |
hostId |
|
Byte |
error |
|
Returns
GetOutgoingMessageCount()
Declaration
public static int GetOutgoingMessageCount()
Returns
GetOutgoingMessageCountForConnection(Int32, Int32, out Byte)
Declaration
public static int GetOutgoingMessageCountForConnection(int hostId, int connectionId, out byte error)
Parameters
Returns
GetOutgoingMessageCountForHost(Int32, out Byte)
Declaration
public static int GetOutgoingMessageCountForHost(int hostId, out byte error)
Parameters
Type |
Name |
Description |
Int32 |
hostId |
|
Byte |
error |
|
Returns
GetOutgoingMessageQueueSize(Int32, out Byte)
Declaration
public static int GetOutgoingMessageQueueSize(int hostId, out byte error)
Parameters
Type |
Name |
Description |
Int32 |
hostId |
|
Byte |
error |
|
Returns
GetOutgoingPacketCount()
Declaration
public static int GetOutgoingPacketCount()
Returns
GetOutgoingPacketCountForConnection(Int32, Int32, out Byte)
Declaration
public static int GetOutgoingPacketCountForConnection(int hostId, int connectionId, out byte error)
Parameters
Returns
GetOutgoingPacketCountForHost(Int32, out Byte)
Declaration
public static int GetOutgoingPacketCountForHost(int hostId, out byte error)
Parameters
Type |
Name |
Description |
Int32 |
hostId |
|
Byte |
error |
|
Returns
GetOutgoingPacketNetworkLossPercent(Int32, Int32, out Byte)
Declaration
public static int GetOutgoingPacketNetworkLossPercent(int hostId, int connectionId, out byte error)
Parameters
Returns
GetOutgoingPacketOverflowLossPercent(Int32, Int32, out Byte)
Declaration
public static int GetOutgoingPacketOverflowLossPercent(int hostId, int connectionId, out byte error)
Parameters
Returns
GetOutgoingSystemBytesCount()
Declaration
public static int GetOutgoingSystemBytesCount()
Returns
GetOutgoingSystemBytesCountForConnection(Int32, Int32, out Byte)
Declaration
public static int GetOutgoingSystemBytesCountForConnection(int hostId, int connectionId, out byte error)
Parameters
Returns
GetOutgoingSystemBytesCountForHost(Int32, out Byte)
Declaration
public static int GetOutgoingSystemBytesCountForHost(int hostId, out byte error)
Parameters
Type |
Name |
Description |
Int32 |
hostId |
|
Byte |
error |
|
Returns
GetOutgoingUserBytesCount()
Declaration
public static int GetOutgoingUserBytesCount()
Returns
GetOutgoingUserBytesCountForConnection(Int32, Int32, out Byte)
Declaration
public static int GetOutgoingUserBytesCountForConnection(int hostId, int connectionId, out byte error)
Parameters
Returns
GetOutgoingUserBytesCountForHost(Int32, out Byte)
Declaration
public static int GetOutgoingUserBytesCountForHost(int hostId, out byte error)
Parameters
Type |
Name |
Description |
Int32 |
hostId |
|
Byte |
error |
|
Returns
|
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
Returns
|
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
Returns
GetRemoteDelayTimeMS(Int32, Int32, Int32, out Byte)
Declaration
public static int GetRemoteDelayTimeMS(int hostId, int connectionId, int remoteTime, out byte error)
Parameters
Returns
|
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
Returns
|
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
IsBroadcastDiscoveryRunning()
Declaration
public static bool IsBroadcastDiscoveryRunning()
Returns
NotifyWhenConnectionReadyForSend(Int32, Int32, Int32, out Byte)
Declaration
public static bool NotifyWhenConnectionReadyForSend(int hostId, int connectionId, int notificationLevel, out byte error)
Parameters
Returns
|
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
Returns
|
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
Returns
|
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
Returns
|
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
RemoveHost(Int32)
Declaration
public static bool RemoveHost(int hostId)
Parameters
Type |
Name |
Description |
Int32 |
hostId |
|
Returns
|
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
Returns
SendMulticast(Int32, Int32, out Byte)
Declaration
public static bool SendMulticast(int hostId, int connectionId, out byte error)
Parameters
Returns
SendQueuedMessages(Int32, Int32, out Byte)
Declaration
public static bool SendQueuedMessages(int hostId, int connectionId, out byte error)
Parameters
Returns
SetBroadcastCredentials(Int32, Int32, Int32, Int32, out Byte)
Declaration
public static void SetBroadcastCredentials(int hostId, int key, int version, int subversion, out byte error)
Parameters
SetPacketStat(Int32, Int32, Int32, Int32)
Declaration
public static void SetPacketStat(int direction, int packetStatId, int numMsgs, int numBytes)
Parameters
|
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
Returns
|
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
Returns
StopBroadcastDiscovery()
Declaration
public static void StopBroadcastDiscovery()
Extension Methods