baml.ws.CloseEvent
How a connection ended, as reported by `WebSocket.next`. Mirrors the browser's [`CloseEvent`](https://developer.mozilla.org/en-US/docs/Web/API/CloseEvent).
Reference version
Signature
class baml.ws.CloseEventHow a connection ended, as reported by WebSocket.next. Mirrors the
browser's CloseEvent.
Source:<builtin>/baml/ns_ws/ws.bamlbytes 1985–2309
Fields
code
intThe RFC 6455 status code. Two are synthesized rather than received:
1005 when the peer's close frame carried no code, and 1006 when the
connection dropped with no closing handshake at all.
reason
stringThe peer's reason, or "" if it gave none.
Implementations
baml.Concrete for T
Source:<builtin>/baml/core.bamlbytes 763–795