Class MassiveStreamClient
- Namespace
- MassiveDotNet.WebSocket
- Assembly
- MassiveDotNet.WebSocket.dll
Opens streaming connections to the Massive platform.
public sealed class MassiveStreamClient : IAsyncDisposable
- Inheritance
-
MassiveStreamClient
- Implements
- Inherited Members
Remarks
Long-lived and shared. One instance can open several market streams; each owns its own socket, because the market is a path segment on the feed host rather than a subscription parameter.
Constructors
MassiveStreamClient(MassiveStreamOptions)
Creates a client.
public MassiveStreamClient(MassiveStreamOptions options)
Parameters
optionsMassiveStreamOptionsThe stream configuration. Validated immediately.
Methods
ConnectStocksAsync(CancellationToken)
Opens an authenticated stock stream.
public Task<MassiveStockStream> ConnectStocksAsync(CancellationToken cancellationToken = default)
Parameters
cancellationTokenCancellationTokenCancels the handshake.
Returns
- Task<MassiveStockStream>
The connected stream.
Exceptions
- MassiveStreamAuthenticationException
The key was refused, or the plan does not include WebSocket access for this market. The server's own message is on ServerMessage.
DisposeAsync()
Closes every stream this client opened.
public ValueTask DisposeAsync()