feat: add setKeepAlive method

This commit is contained in:
Derrick Hammer 2023-07-23 14:39:42 -04:00
parent 88586ca65a
commit 19dceedab2
Signed by: pcfreak30
GPG Key ID: C997C339BE476FF2
1 changed files with 7 additions and 0 deletions

View File

@ -257,6 +257,13 @@ export class Socket extends Client {
return this.callModuleReturn("socketListeners", { id: this.id }); return this.callModuleReturn("socketListeners", { id: this.id });
} }
public setKeepAlive(ms: number) {
this.callModuleReturn("socketSetKeepAlive", {
id: this.id,
alive: ms,
});
}
private ensureEvent(event: string): void { private ensureEvent(event: string): void {
if (!(event in this.eventUpdates)) { if (!(event in this.eventUpdates)) {
this.eventUpdates[event] = new Map<Function, DataFn>(); this.eventUpdates[event] = new Map<Function, DataFn>();