I have a service which supports tls 1.3.
Upon research I found that clientwebsocket only supports tls 1.2
I tried to use Clientwebsocket with http2:
using SocketsHttpHandler handler = new();
Socket.ConnectAsync(Host, new HttpMessageInvoker(handler), CancellationToken.None).Wait();
But that one does not let me set certificates:
ArgumentException: UseDefaultCredentials, Credentials, Proxy,
ClientCertificates, RemoteCertificateValidationCallback and Cookies
must not be set on ClientWebSocketOptions when an HttpMessageInvoker
instance is also specified. These options should be set on the
HttpMessageInvoker's underlying HttpMessageHandler instead.
(Parameter 'options')
I have not found reference on microsoft on how to set these options. Id be happy if you either could show an example f how to bring the "classic" clientwebsocket to tls 1.3 or how to specify the options on the httpmessagehandler with http2