Documentation Index
Fetch the complete documentation index at: https://mintlify.com/MercuryWorkshop/epoxy-tls/llms.txt
Use this file to discover all available pages before exploring further.
EpoxyHandlers is a simple container for the four event-handler functions that connect_websocket needs to route WebSocket lifecycle events back to your JavaScript code. All four callbacks are required; there are no optional handlers. Pass an EpoxyHandlers instance as the first argument to EpoxyClient.connect_websocket.
EpoxyHandlers is only available in the full build (@mercuryworkshop/epoxy-tls/epoxy or @mercuryworkshop/epoxy-tls/epoxy-bundled). It does not exist in the minimal build. See the EpoxyClient page for details on which features require the full build.Constructor
handlers.onopen, handlers.onclose, etc.).
Called once when the proxied WebSocket connection has been successfully established and the server has completed the upgrade handshake. Receives no arguments.
Called when the WebSocket connection is closed, either cleanly by the remote peer or because the underlying Wisp stream ended. Receives no arguments.
Called if an error occurs during the connection or while reading frames. The
error argument is the underlying error value — typically a JavaScript Error object or an EpoxyError string.Called for every incoming WebSocket message frame. The type of
data depends on the frame type sent by the server:- Text frames —
datais a JavaScriptstring. - Binary frames —
datais anArrayBuffer.
typeof data === "string" or data instanceof ArrayBuffer to branch accordingly.