You've already forked Nitro_Render_V3
mirror of
https://github.com/duckietm/Nitro_Render_V3.git
synced 2026-06-20 15:36:18 +00:00
🆕 Disconnection handler, when you got disconnected you automatic go back to the room
This commit is contained in:
@@ -0,0 +1,25 @@
|
||||
import { NitroEvent } from './NitroEvent';
|
||||
|
||||
export class ReconnectEvent extends NitroEvent
|
||||
{
|
||||
private _attempt: number;
|
||||
private _maxAttempts: number;
|
||||
|
||||
constructor(type: string, attempt: number = 0, maxAttempts: number = 0)
|
||||
{
|
||||
super(type);
|
||||
|
||||
this._attempt = attempt;
|
||||
this._maxAttempts = maxAttempts;
|
||||
}
|
||||
|
||||
public get attempt(): number
|
||||
{
|
||||
return this._attempt;
|
||||
}
|
||||
|
||||
public get maxAttempts(): number
|
||||
{
|
||||
return this._maxAttempts;
|
||||
}
|
||||
}
|
||||
@@ -1,4 +1,5 @@
|
||||
export * from './ConfigurationEvent';
|
||||
export * from './MessageEvent';
|
||||
export * from './NitroEvent';
|
||||
export * from './ReconnectEvent';
|
||||
export * from './SocketConnectionEvent';
|
||||
|
||||
Reference in New Issue
Block a user