Skip to main content
Closes a WebSocket object returned by WebSocket.connect. The first argument must be a table. The function reads the object’s connection state; when a live state exists and is not already destroyed or closed, it sets isClosed to true and sends an empty close frame frame with the stored WebSocket connection. It does not accept a close code or reason and returns no values.

Syntax

Arguments

Example

Close a WebSocket object returned by WebSocket.connect.