From 19dceedab299c1cd35563c5c88a3f608cfc56deb Mon Sep 17 00:00:00 2001 From: Derrick Hammer Date: Sun, 23 Jul 2023 14:39:42 -0400 Subject: [PATCH] feat: add setKeepAlive method --- src/index.ts | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/index.ts b/src/index.ts index 9ae6937..decd860 100644 --- a/src/index.ts +++ b/src/index.ts @@ -257,6 +257,13 @@ export class Socket extends Client { return this.callModuleReturn("socketListeners", { id: this.id }); } + public setKeepAlive(ms: number) { + this.callModuleReturn("socketSetKeepAlive", { + id: this.id, + alive: ms, + }); + } + private ensureEvent(event: string): void { if (!(event in this.eventUpdates)) { this.eventUpdates[event] = new Map();