Close handler.
The code is optional in the type and load-bearing in practice: the hub
accepts a handshake it means to refuse and then closes it with a code, so
that a client can tell "no hub here" from "your token is wrong". A handler
that ignored the code would make that choice pointless.
The subset of
WebSocketthis client uses, so a test can supply a fake.Only the event payloads this client reads are declared. A real
WebSockettherefore satisfies this structurally except for its handler arity, which the module-privateopenPlatformSocketbridges.