You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
LeanHttp.WebSocket: a ws:// and wss:// client over libcurl's WebSocket
API (libcurl 7.86 and later). connect, withConnection, Connection.send, recv, ping and close, with connectAsync, Connection.sendAsync and Connection.recvAsync plus the matching Task variants for blocking calls on
dedicated workers. TLS policy, proxies, user agent and default headers come
from Session.Config; subprotocols and extra handshake headers come from WebSocket.Options.
Messages, close codes, receive limits and fragment reassembly are leanws types, so LeanHttp and LeanWs.Client present the same LeanWs.Message values. leanws is a new
package dependency.
WebSocket.supported and the Error.Kind.websocketUnsupported case report a
libcurl without WebSocket support, distinguishing it from a transport failure. Error.Kind.websocketProtocol reports handshake and RFC 6455 failures,
including a message over Options.limits, which also closes with 1009.
Target.resolveIn resolves a target against an explicit scheme set, with Target.httpSchemes and Target.webSocketSchemes. Target.resolve keeps its
HTTP behavior.
Fixed
Requests set CURLOPT_PATH_AS_IS, so a percent-encoded %2E path segment
stays data. libcurl 8.10 and later decode it and then apply dot-segment
removal, which turned .segment "." into directory navigation on the wire. Target.resolve already performs RFC 3986 dot-segment removal itself.
Documentation
The README opens with an install and quick-start path, carries a table of
contents, and documents every Error.Kind case and its SslFailure detail in
one table.
Compatibility
Additive except for Error.Kind, which gained two cases; exhaustive matches
over it need updating. libcurl without WebSocket support keeps serving every
HTTP request and degrades to the typed .websocketUnsupported error.