Interface IInlineWebSocketChannel
- Namespace
- Kuestenlogik.Bowire
- Assembly
- Kuestenlogik.Bowire.dll
Optional capability surface for protocol plugins that can open a raw
WebSocket channel — used by plugins that need to ride on top of a
WebSocket transport (e.g. the GraphQL plugin's graphql-transport-ws
subscription support) without taking a compile-time dependency on
Kuestenlogik.Bowire.Protocol.WebSocket.
Implementers should honour the subProtocols parameter by passing
it to ClientWebSocket.Options.AddSubProtocol(...) before the
handshake — that's how WebSocket sub-protocols like
graphql-transport-ws are negotiated. Headers go on the upgrade
request via SetRequestHeader so the existing auth-helper
pipeline keeps working unchanged.
public interface IInlineWebSocketChannel
Methods
OpenAsync(string, IReadOnlyList<string>?, Dictionary<string, string>?, CancellationToken)
Connect to url with the given sub-protocols and
request headers, and return an IBowireChannel the
caller can drive to send and receive frames. url
must use the ws:// or wss:// scheme — http/https URLs
should be rewritten by the caller before invoking this.
Task<IBowireChannel> OpenAsync(string url, IReadOnlyList<string>? subProtocols, Dictionary<string, string>? headers, CancellationToken ct = default)
Parameters
urlstringsubProtocolsIReadOnlyList<string>headersDictionary<string, string>ctCancellationToken