OptionalonClose?: () => MaybePromise<void>OptionalonError?: (Function that will be called whenever an error happens while connecting
(in which case connection will be null) or inside onOpen.
Function to call once the connection is open
As soon as the promise is resolved the connection will be closed (and will not be re-opened automatically), so this is the best place to put your recv loop
OptionalonWait?: (wait: number) => voidOptionalstrategy?: ReconnectionStrategyReadonlyparamsOpen a connection. The signal is aborted if the connection is closed before this resolves.
OptionalonClose?: () => MaybePromise<void>OptionalonError?: (Function that will be called whenever an error happens while connecting
(in which case connection will be null) or inside onOpen.
Function to call once the connection is open
As soon as the promise is resolved the connection will be closed (and will not be re-opened automatically), so this is the best place to put your recv loop
OptionalonWait?: (wait: number) => voidOptionalstrategy?: ReconnectionStrategy
Open a connection. The signal is aborted if the connection is closed before this resolves.