🆕 Disconnection handler, when you got disconnected you automatic go back to the room

This commit is contained in:
duckietm
2026-03-19 15:04:47 +01:00
parent eee289e8f2
commit 5aef7a3de2
16 changed files with 498 additions and 87 deletions
@@ -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
View File
@@ -1,4 +1,5 @@
export * from './ConfigurationEvent';
export * from './MessageEvent';
export * from './NitroEvent';
export * from './ReconnectEvent';
export * from './SocketConnectionEvent';