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

long

Id

Unique identifier for this channel.

string Id { get; }

Property Value

string

IsClientStreaming

Whether the client can stream messages.

bool IsClientStreaming { get; }

Property Value

bool

IsClosed

Whether the send side has been closed.

bool IsClosed { get; }

Property Value

bool

IsServerStreaming

Whether the server can stream responses.

bool IsServerStreaming { get; }

Property Value

bool

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

string

SentCount

Number of messages sent so far.

int SentCount { get; }

Property Value

int

Methods

CloseAsync(CancellationToken)

Close the send side of the channel.

Task CloseAsync(CancellationToken ct = default)

Parameters

ct CancellationToken

Returns

Task

ReadResponsesAsync(CancellationToken)

Read responses as they arrive.

IAsyncEnumerable<string> ReadResponsesAsync(CancellationToken ct = default)

Parameters

ct CancellationToken

Returns

IAsyncEnumerable<string>

SendAsync(string, CancellationToken)

Send a message to the channel.

Task<bool> SendAsync(string jsonMessage, CancellationToken ct = default)

Parameters

jsonMessage string
ct CancellationToken

Returns

Task<bool>