Close intentionally. The instance is reusable afterwards: connect() opens
a fresh session.
Bookkeeping is cleared with the socket because after this call nothing is
subscribed, and state that says otherwise is a lie a later reconnect would
act on. Event callbacks survive: the caller holds their unsubscribe
functions and never asked to drop them.
Returns void
connect
connect():void
Open the socket. Also the deliberate way back from a refused key or an
earlier close(): both are user-intent states, and only user intent clears
them (design §5.2, FATAL -> CONNECTING on an explicit connect).
Returns void
isReady
isReady():boolean
True once the handshake is acknowledged: the only time data frames go out.
Close intentionally. The instance is reusable afterwards:
connect()opens a fresh session.Bookkeeping is cleared with the socket because after this call nothing is subscribed, and state that says otherwise is a lie a later reconnect would act on. Event callbacks survive: the caller holds their unsubscribe functions and never asked to drop them.