Interface IBowireChannel
- Namespace
- Kuestenlogik.Bowire
- Assembly
- Kuestenlogik.Bowire.dll
Interactive bidirectional channel for duplex/client-streaming protocols.
public interface IBowireChannel : IAsyncDisposable
- Inherited Members
Properties
ElapsedMs
Elapsed time since channel was opened.
long ElapsedMs { get; }
Property Value
Id
Unique identifier for this channel.
string Id { get; }
Property Value
IsClientStreaming
Whether the client can stream messages.
bool IsClientStreaming { get; }
Property Value
IsClosed
Whether the send side has been closed.
bool IsClosed { get; }
Property Value
IsServerStreaming
Whether the server can stream responses.
bool IsServerStreaming { get; }
Property Value
NegotiatedSubProtocol
Protocol-negotiated sub-protocol, if any. WebSocket exposes the
value picked by the server's handshake response so the recorder
can capture it and the mock can replay a matching upgrade
negotiation. Channels that don't use sub-protocols (SignalR,
MCP, Socket.IO) return null.
string? NegotiatedSubProtocol { get; }
Property Value
SentCount
Number of messages sent so far.
int SentCount { get; }
Property Value
Methods
CloseAsync(CancellationToken)
Close the send side of the channel.
Task CloseAsync(CancellationToken ct = default)
Parameters
Returns
ReadResponsesAsync(CancellationToken)
Read responses as they arrive.
IAsyncEnumerable<string> ReadResponsesAsync(CancellationToken ct = default)
Parameters
Returns
SendAsync(string, CancellationToken)
Send a message to the channel.
Task<bool> SendAsync(string jsonMessage, CancellationToken ct = default)
Parameters
jsonMessagestringctCancellationToken