Create a new StreamMetadata instance, connects to the server using WebSocket and listen to metadata events.
Returns true if the connection is closed
Returns the Connect.Params object containing the connection parameters
State of the stream as indicated by the server
URL of the connection
Close the stream metadata channel
Optionalerror: StreamMetadataErrorerror description on an improper closure
Event subscription
Name of event without the on prefix (ex: log to onLog event declared)
Subscriber Function
Optionaloptions: { signal?: AbortSignal }Optionalsignal?: AbortSignalOptional AbortSignal to stop this or multiple subscriptions in same time
Event subscription only one time, once time fired it's automatically unsubscribe
Name of event without the on prefix (ex: log to onLog event declared)
Subscriber Function
Optionaloptions: { signal?: AbortSignal }Optionalsignal?: AbortSignalOptional AbortSignal to stop this or multiple subscriptions in same time
Event fired when the stream is closed
Optionalerror: StreamMetadataErrorerror description on an improper closure
Use StreamMetadata to get real-time information on a server stream, including:
Example