Skip to content

Interface IPlayer

Namespace: Void.Proxy.Api.Players
Assembly: Void.Proxy.Api.dll

Represents a connected player and exposes information about their network connection and execution context.

public interface IPlayer : IEquatable<IPlayer>, ICommandSource, IAsyncDisposable, IDisposable

Implements

IEquatable<IPlayer>, ICommandSource, IAsyncDisposable, IDisposable

Properties

Client

Gets the underlying used for network. communication.

TcpClient Client { get; }

Property Value

TcpClient

ConnectedAt

Gets the date and time when the player connected to the proxy.

DateTimeOffset ConnectedAt { get; }

Property Value

DateTimeOffset

Context

Gets the context containing services and state associated with the player.

IPlayerContext Context { get; }

Property Value

IPlayerContext

Name

Gets the name of the player. Falls back to IP address if unavailable.

string Name { get; }

Property Value

string

RemoteEndPoint

Gets the textual representation of the client’s remote endpoint.

string RemoteEndPoint { get; }

Property Value

string

Methods

GetStableHashCode()

Computes a stable hash code for the current instance. This is useful when the instance is upgraded or replaced to another implementation.

int GetStableHashCode()

Returns

int

An integer representing the hash code of the current instance, derived from the property.

Remarks

The hash code is based on the property.