From f54d0b45d1d9924d2562fd8f6f59cbca2bcbcc2c Mon Sep 17 00:00:00 2001 From: Alex Hultman Date: Sun, 1 Mar 2020 01:39:52 +0100 Subject: [PATCH] Add files via upload --- index.d.ts | 23 ++++++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-) diff --git a/index.d.ts b/index.d.ts index bc575f51..9cfe5ee4 100644 --- a/index.d.ts +++ b/index.d.ts @@ -139,6 +139,10 @@ export interface WebSocketBehavior { drain?: (ws: WebSocket) => void; /** Handler for close event, no matter if error, timeout or graceful close. You may not use WebSocket after this event. */ close?: (ws: WebSocket, code: number, message: ArrayBuffer) => void; + /** Handler for received ping control message. */ + ping?: (ws: WebSocket) => void; + /** Handler for received pong control message. */ + pong?: (ws: WebSocket) => void; } /** Options used when constructing an app. */ @@ -198,5 +202,22 @@ export type CompressOptions = number; export var DISABLED: CompressOptions; /** Zero memory overhead compression (recommended) */ export var SHARED_COMPRESSOR: CompressOptions; -/** Sliding dedicated compress window, requires lots of memory per socket */ +/** Sliding dedicated compress window, requires 256KB of memory per socket */ export var DEDICATED_COMPRESSOR: CompressOptions; + +/** Sliding dedicated compress window, requires 3KB of memory per socket */ +export var DEDICATED_COMPRESSOR_3KB: CompressOptions; +/** Sliding dedicated compress window, requires 4KB of memory per socket */ +export var DEDICATED_COMPRESSOR_4KB: CompressOptions; +/** Sliding dedicated compress window, requires 8KB of memory per socket */ +export var DEDICATED_COMPRESSOR_8KB: CompressOptions; +/** Sliding dedicated compress window, requires 16KB of memory per socket */ +export var DEDICATED_COMPRESSOR_16KB: CompressOptions; +/** Sliding dedicated compress window, requires 32KB of memory per socket */ +export var DEDICATED_COMPRESSOR_32KB: CompressOptions; +/** Sliding dedicated compress window, requires 64KB of memory per socket */ +export var DEDICATED_COMPRESSOR_64KB: CompressOptions; +/** Sliding dedicated compress window, requires 128KB of memory per socket */ +export var DEDICATED_COMPRESSOR_128KB: CompressOptions; +/** Sliding dedicated compress window, requires 256KB of memory per socket */ +export var DEDICATED_COMPRESSOR_256KB: CompressOptions;