Transport Layer API.
IsStarted | Deprecated. |
AddHost | Creates a host based on HostTopology. |
AddHostWithSimulator | Create a host and configure them to simulate Internet latency (works on Editor and development build only). |
AddWebsocketHost | Created web socket host. |
Connect | Tries to establish a connection to another peer. |
ConnectAsNetworkHost | Create dedicated connection to Relay server. |
ConnectEndPoint | Try to establish connection to other peer, where the peer is specified using a C# System.EndPoint. |
ConnectToNetworkPeer | Create a connection to another peer in the Relay group. |
ConnectWithSimulator | Connect with simulated latency. |
Disconnect | Send a disconnect signal to the connected peer and close the connection. Poll NetworkTransport.Receive() to be notified that the connection is closed. This signal is only sent once (best effort delivery). If this packet is dropped for some reason, the peer closes the connection by timeout. |
DisconnectNetworkHost | This will disconnect the host and disband the group. DisconnectNetworkHost can only be called by the group owner on the relay server. |
FinishSendMulticast | Finalizes sending of a message to a group of connections. Only one multicast message at a time is allowed per host. |
GetAckBufferCount | Returns size of reliable buffer. |
GetAssetId | The Unity Multiplayer spawning system uses assetIds to identify what remote objects to spawn. This function allows you to get the assetId for the prefab associated with an object. |
GetBroadcastConnectionInfo | After NetworkTransport.Receive() returns NetworkEventType.BroadcastEvent, this function will return the connection information of the broadcast sender. This information can then be used for connecting to the broadcast sender. |
GetBroadcastConnectionMessage | After NetworkTransport.Receive() returns NetworkEventType.BroadcastEvent, this function returns a complimentary message from the broadcast sender. |
GetConnectionInfo | Returns the connection parameters for the specified connectionId. These parameters can be sent to other users to establish a direct connection to this peer. If this peer is connected to the host via Relay, the Relay-related parameters are set. |
GetCurrentRTT | Return the round trip time for the given connectionId. |
GetIncomingMessageQueueSize | Returns the number of received messages waiting in the queue for processing. |
GetIncomingPacketCount | Returns how many packets have been received from start for connection. |
GetIncomingPacketCountForAllHosts | Returns how many packets have been received from start. (from NetworkTransport.Init call). |
GetIncomingPacketDropCountForAllHosts | How many packets have been dropped due lack space in incoming queue (absolute value, countinf from start). |
GetIncomingPacketLossCount | Returns how many incoming packets have been lost due transmitting (dropped by network). |
GetMaxAllowedBandwidth | Gets the currently-allowed network bandwidth in bytes per second. The value returned can vary because bandwidth can be throttled by flow control. If the bandwidth is throttled to zero, the connection is disconnected.ted. |
GetNetworkTimestamp | Get a network timestamp. Can be used in your messages to investigate network delays together with Networking.GetRemoteDelayTimeMS. |
GetOutgoingFullBytesCount | Returns how much raw data (in bytes) have been sent from start for all hosts (from NetworkTransport.Init call). |
GetOutgoingFullBytesCountForConnection | Returns how much raw data (in bytes) have been sent from start for connection (from call NetworkTransport.Connect for active connect or from connection request receiving for passive connect). |
GetOutgoingFullBytesCountForHost | Returns how much raw data (in bytes) have been sent from start for the host (from call NetworkTransport.AddHost). |
GetOutgoingMessageCount | Returns how many messages have been sent from start (from NetworkTransport.Init call). |
GetOutgoingMessageCountForConnection | Returns how many packets have been sent from start for connection (from call NetworkTransport.Connect for active connect or from connection request receiving for passive connect). |
GetOutgoingMessageCountForHost | Returns how many messages have been sent from start for host (from call NetworkTransport.AddHost). |
GetOutgoingMessageQueueSize | Returns the number of messages waiting in the outgoing message queue to be sent. |
GetOutgoingPacketCount | Returns how many packets have been sent from start (from call NetworkTransport.Init) for all hosts. |
GetOutgoingPacketCountForConnection | Returns how many packets have been sent for connection from it start (from call NetworkTransport.Connect for active connect or from connection request receiving for passive connect). |
GetOutgoingPacketCountForHost | Returns how many packets have been sent for host from it start (from call NetworkTransport.AddHost). |
GetOutgoingPacketNetworkLossPercent | Returns the value in percent of the number of sent packets that were dropped by the network and not received by the peer. |
GetOutgoingPacketOverflowLossPercent | Returns the value in percent of the number of sent packets that were dropped by the peer. |
GetOutgoingSystemBytesCount | Returns how much user payload and protocol system headers (in bytes) have been sent from start (from NetworkTransport.Init call). |
GetOutgoingSystemBytesCountForConnection | Returns how much payload and protocol system headers (in bytes) have been sent from start for connection (from call NetworkTransport.Connect for active connect or from connection request receiving for passive connect). |
GetOutgoingSystemBytesCountForHost | Returns how much payload and protocol system headers (in bytes) have been sent from start for the host (from call NetworkTransport.AddHost). |
GetOutgoingUserBytesCount | Returns how much payload (user) bytes have been sent from start (from NetworkTransport.Init call). |
GetOutgoingUserBytesCountForConnection | Returns how much payload (user) bytes have been sent from start for connection (from call NetworkTransport.Connect for active connect or from connection request receiving for passive connect). |
GetOutgoingUserBytesCountForHost | Returns how much payload (user) bytes have been sent from start for the host (from call NetworkTransport.AddHost). |
GetRemoteDelayTimeMS | Returns the delay for the timestamp received. |
Init | Initializes the NetworkTransport. Should be called before any other operations on the NetworkTransport are done. |
IsBroadcastDiscoveryRunning | Check if the broadcast discovery sender is running. |
QueueMessageForSending | Function is queueing but not sending messages. |
Receive | Called to poll the underlying system for events. |
ReceiveFromHost | Similar to NetworkTransport.Receive but will only poll for the provided hostId. |
ReceiveRelayEventFromHost | Polls the host for the following events: NetworkEventType.ConnectEvent and NetworkEventType.DisconnectEvent. Can only be called by the relay group owner. |
RemoveHost | Closes the opened socket, and closes all connections belonging to that socket. |
Send | Send data to peer. |
SendMulticast | Add a connection for the multicast send. |
SendQueuedMessages | Sends messages, previously queued by NetworkTransport.QueueMessageForSending function. |
SetBroadcastCredentials | Sets the credentials required for receiving broadcast messages. Should any credentials of a received broadcast message not match, the broadcast discovery message is dropped. |
SetPacketStat | Used to inform the profiler of network packet statistics. |
Shutdown | Shut down the NetworkTransport. |
StartBroadcastDiscovery | Starts sending a broadcasting message in all local subnets. |
StartSendMulticast | Start to multicast send. |
StopBroadcastDiscovery | Stop sending the broadcast discovery message. |