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, used for local RPCs.
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
HasPermissionChecks if the connection has a specific permission.
KickKicks the connection for a specified reason.
SendLogSends a log message to the connection.
SendMessageSends a message to the connection.
GetUserDataRetrieves user data associated with a specific key.
SendRequestSends a request to the connection and awaits a response.
SendResponseSends a response to a request identified by a request ID.
IdThis connection's unique identifier.
CanSpawnObjectsIndicates if the connection can spawn networked objects.
CanRefreshObjectsIndicates if the connection can refresh networked objects they own.
LatencyThe latency of the connection.
NameThe name of the connection.
TimeThe time associated with the connection.
AddressThe address of the connection.
IsHostIndicates if the connection is the host.
IsConnectingTrue if the connection is still currently connecting.
IsActiveTrue if the connection is fully connected and logged on.
MessagesSentThe number of messages sent to this connection.
MessagesRecievedThe number of messages received from this connection.
StatsProvides stats about the connection, such as bandwidth usage.
PingThe ping of the connection in milliseconds.
DisplayNameThe display name of the connection.
SteamIdThe Steam ID associated with the connection.
PartyIdThe ID of the party the user is part of, used for grouping.
ConnectionTimeThe time when the connection was established.