OptionalsendSend a frame to the server (optional). The hook uses it for a liveness heartbeat ('ping'); a transport that omits it simply gets no heartbeat and relies on the socket's own onClose. Browsers cannot send on a half-open socket, so the heartbeat + a pong deadline is what detects a silently dead connection and resumes polling (a broadcast-only run channel never fires onClose on its own).
A live connection the hook closes on unmount / transport change.