Optional closeHandler for close event, no matter if error, timeout or graceful close. You may not use WebSocket after this event. Do not send on this WebSocket from within here, it is closed.
Optional closeWhether or not we should automatically close the socket when a message is dropped due to backpressure. Defaults to false.
Optional compressionWhat permessage-deflate compression to use. uWS.DISABLED, uWS.SHARED_COMPRESSOR or any of the uWS.DEDICATED_COMPRESSOR_xxxKB. Defaults to uWS.DISABLED.
Optional drainOptional idleMaximum amount of seconds that may pass without sending or getting a message. Connection is closed if this timeout passes. Resolution (granularity) for timeouts are typically 4 seconds, rounded to closest. Disable by using 0. Defaults to 120.
Optional maxMaximum length of allowed backpressure per socket when publishing or sending messages. Slow receivers with too high backpressure will be skipped until they catch up or timeout. Defaults to 64 * 1024.
Optional maxMaximum number of minutes a WebSocket may be connected before being closed by the server. 0 disables the feature.
Optional maxMaximum length of received message. If a client tries to send you a message larger than this, the connection is immediately closed. Defaults to 16 * 1024.
Optional messageHandler for a WebSocket message. Messages are given as ArrayBuffer no matter if they are binary or not. Given ArrayBuffer is valid during the lifetime of this callback (until first await or return) and will be neutered.
Optional openOptional pingOptional pongOptional sendWhether or not we should automatically send pings to uphold a stable connection given whatever idleTimeout.
Optional upgradeUpgrade handler used to intercept HTTP upgrade requests and potentially upgrade to WebSocket. See UpgradeAsync and UpgradeSync example files.
Generated using TypeDoc
A structure holding settings and handlers for a WebSocket URL route handler.