Select your preferred scripting language. All code snippets will be displayed in this language.
class in UnityEngine.Networking
Thank you for helping us improve the quality of Unity Documentation. Although we cannot accept all submissions, we do read each suggested change from our users and will make updates where applicable.
CloseHigh level UNET connection.
address | The IP address associated with the connection. |
connectionId | Unique identifier for this connection. |
hostId | Transport level host id for this connection. |
isReady | Flag that tells if the connection has been marked as "ready" by a client calling NetworkClient.Ready(). |
lastMessageTime | The last time that a message was received on this connection. |
playerControllers | The list of players for this connection. |
Disconnect | Disconnects this connection. |
Dispose | Disposes of this connection, releasing channel buffers that it holds. |
GetStatsIn | Get statistics for incoming traffic. |
GetStatsOut | Get statistics for outgoing traffic. |
Initialize | This inializes the internal data structures of a NetworkConnection object, including channel buffers. |
ResetStats | Resets the statistics that are returned from NetworkClient.GetConnectionStats(). |
Send | This sends the contents of the message structure with the message type. |
SendByChannel | Sends a message on a specific channel. |
SendBytes | This sends an array of bytes on the connection. |
SendUnreliable | This sends the contents of the message structure with the message id. |
SendWriter | This sends the contents of a NetworkWriter object on the connection. |
SetChannelOption | This sets an option on the network channel. |
SetMaxDelay | The maximum time in seconds that messages are buffered before being sent. |
ToString | Returns a string representation of the NetworkConnection object state. |