Optional closeOptional async callback to close connections.
The connection to close
Async callback to create new connections.
A new connection object
Optional connectDefault connection timeout in milliseconds. Defaults to 10000 (10 seconds).
Optional markIf true, the session will be marked as fresh when get() is called. Only used when maxSessionDuration is set.
Optional maxMaximum duration in milliseconds before forcing reconnection. If not set, connections will never expire based on duration.
Helper class to manage persistent connections like websockets.