Table of Contents

Interface IConnection

Namespace
Xabbo.Connection
Assembly
Xabbo.Common.dll

Represents a connection to the game server.

public interface IConnection : IParserContext
Inherited Members
Extension Methods

Properties

DisconnectToken

Gets a cancellation token that is triggered when the connection is lost.

CancellationToken DisconnectToken { get; }

Property Value

CancellationToken

IsConnected

Gets whether a connection to the game is currently established.

bool IsConnected { get; }

Property Value

bool

Session

Gets the session information for the current connection.

Session Session { get; }

Property Value

Session

Methods

Send(IPacket)

Sends a packet to the client or server, specified by the direction of the packet's header.

void Send(IPacket packet)

Parameters

packet IPacket

Events

Connected

Occurs when a connection to the game is established.

event Action<ConnectedEventArgs>? Connected

Event Type

Action<ConnectedEventArgs>

Disconnected

Occurs when a connection to the game ends.

event Action? Disconnected

Event Type

Action