class Connection
A connection, usually to a server or a client.
public bool HasPermission( string permission )
Get whether this connection has a specific permission.
public Guid Id { get; }
This connection's unique identifier.
public bool CanSpawnObjects { get; set; }
Can this connection spawn networked objects?
public bool CanRefreshObjects { get; set; }
Can this connection refresh networked objects that they own?
public bool IsConnecting { get; }
True if this channel is still currently connecting.
public bool IsActive { get; }
True if this channel is fully connnected and fully logged on.
public int MessagesSent { get; }
How many messages have been sent to this connection?
public int MessagesRecieved { get; }
How many messages have been received from this connection?
public void Kick( string reason )
Kick this from the server. Only the host can kick clients.
reasonThe reason to display to this client.
public void SendLog( LogLevel level, string message )
Log a message to the console for this connection.
public ConnectionStats Stats { get; }
Get stats about this connection such as bandwidth usage and how many packets are being sent and received.
public float Ping { get; }
The ping of this connection (in milliseconds.)
public SteamId PartyId { get; }
The Id of the party that this user is a part of. This can be used to compare to other users to group them into parties.
public static Connection Local { get; }
This is a "fake" connection for the local player. It is passed to RPCs when calling them locally etc.
public static IReadOnlyList<Connection> All { get; }
A list of connections that are currently on this server. If you're not on a server this will return only one connection (Connection.Local). Some games restrict the connection list - in which case you will get an empty list.
public static Connection Host { get; }
The connection of the current network host.
public static Connection Find( Guid id )
Find a for a Connection Id.
public Type GetType( )
😔 No documentation found.
public DateTimeOffset ConnectionTime { get; }
😔 No documentation found.
public void SendResponse( Guid requestId, T t )
😔 No documentation found.
public Task<object> SendRequest( T t )
😔 No documentation found.
public string GetUserData( string key )
😔 No documentation found.
public int GetHashCode( )
😔 No documentation found.
public string DisplayName { get; }
😔 No documentation found.
public string ToString( )
😔 No documentation found.
public bool Equals( object obj )
😔 No documentation found.
public bool IsHost { get; }
😔 No documentation found.
public string Address { get; }
😔 No documentation found.
public float Time { get; }
😔 No documentation found.
public string Name { get; }
😔 No documentation found.
public float Latency { get; }
😔 No documentation found.
public SteamId SteamId { get; }
😔 No documentation found.
public void SendMessage( T t )
😔 No documentation found.