Table of Contents

Class ClientEventArgs

Namespace
BSGameLib.Networking
Assembly
BSGameLib.Networking.dll

Event data for a client connection event.

public class ClientEventArgs : EventArgs
Inheritance
ClientEventArgs
Inherited Members

Constructors

ClientEventArgs(INetConnection, string)

Creates event data for connection, with the reason it closed, if any.

public ClientEventArgs(INetConnection connection, string disconnectReason = null)

Parameters

connection INetConnection
disconnectReason string

Properties

Client

The connection the event is about.

public INetConnection Client { get; }

Property Value

INetConnection

DisconnectReason

For Disconnected events: the reason for the close. That is the reason the local side gave to Disconnect(reason), or else the reason the server gave when it closed the connection (its Disconnect or SendReliableThenDisconnect). It is null when neither gave one, and when the connection was lost rather than closed (pulled cable, crash, etc.).

public string DisconnectReason { get; }

Property Value

string