mirror of
https://github.com/PepperDash/Essentials.git
synced 2026-01-31 13:25:00 +00:00
Using the generated security token as an ID was presenting problems with duplicate connections using the same ID and trying to figure out where to send the messages. Now, the clients have a unique ID that's an increasing integer that restarts at 1 when the program restarts.
25 lines
630 B
C#
25 lines
630 B
C#
using System;
|
|
|
|
namespace PepperDash.Essentials.WebSocketServer
|
|
{
|
|
/// <summary>
|
|
/// Event Args for <see cref="UiClient"/> ConnectionClosed event
|
|
/// </summary>
|
|
public class ConnectionClosedEventArgs : EventArgs
|
|
{
|
|
/// <summary>
|
|
/// Client ID that is being closed
|
|
/// </summary>
|
|
public string ClientId { get; private set; }
|
|
|
|
/// <summary>
|
|
/// Initalize an instance of the <see cref="ConnectionClosedEventArgs"/> class.
|
|
/// </summary>
|
|
/// <param name="clientId">client that's closing</param>
|
|
public ConnectionClosedEventArgs(string clientId)
|
|
{
|
|
ClientId = clientId;
|
|
}
|
|
}
|
|
}
|