class Connection

robot_2Generated
code_blocksInput

Description

The Connection class in the Sandbox namespace represents a network connection, typically to a server or client. It provides various properties and methods to manage and interact with the connection.

Members

Static Members

Member NameSummary
FindFinds a connection by its unique identifier.
LocalThis is a "fake" connection for the local player. It is used for local RPC calls.
AllA list of connections currently on the server. Returns only the local connection if not on a server.
HostThe connection of the current network host.

Instance Members

Member NameSummary
IdThis connection's unique identifier.
CanSpawnObjectsIndicates if this connection can spawn networked objects.
CanRefreshObjectsIndicates if this connection can refresh networked objects they own.
LatencyThe latency of the connection.
NameThe name of the connection.
TimeThe time since the connection was established.
AddressThe address of the connection.
IsHostIndicates if this connection is the host.
IsConnectingTrue if this channel is still currently connecting.
IsActiveTrue if this channel is fully connected and logged on.
MessagesSentNumber of messages sent to this connection.
MessagesRecievedNumber of messages received from this connection.
StatsGet stats about this connection such as bandwidth usage and packet counts.
PingThe ping of this connection in milliseconds.
DisplayNameThe display name of the connection.
SteamIdThe Steam ID associated with this connection.
PartyIdThe ID of the party this user is part of, used for grouping.
ConnectionTimeThe time when the connection was established.
HasPermissionChecks if the connection has a specific permission.
KickKicks the connection with a specified reason.
SendLogSends a log message with a specified level and message.
SendMessageSends a message of a specified type.
GetUserDataRetrieves user data associated with a specified key.
SendRequestSends a request and returns a task representing the asynchronous operation.
SendResponseSends a response to a specified request ID.