sta / websocket-sharp

A C# implementation of the WebSocket protocol client and server
http://sta.github.io/websocket-sharp
MIT License
5.74k stars 1.66k forks source link

Websocket state: Closed #715

Open KryptomineCH opened 1 year ago

KryptomineCH commented 1 year ago

I am trying to connect to a local application with tls 1.3.

This is my code:

using (var ws = new WebSocket("wss://localhost:55400/"))
{
    ws.OnMessage += (sender, e) =>
        OnMessage(sender, e);
    ws.SslConfiguration.ClientCertificates = Authentification.CertificateCollection;
    ws.SslConfiguration.EnabledSslProtocols = System.Security.Authentication.SslProtocols.Tls13;
    ws.Connect();
    WebSocketState state = ws.ReadyState;
    ws.Send(context);
    //Console.ReadKey(true);
}

Wireshark states that some connection attempt is mate bu no cleint hello / handshake

plattform is windows 10 21H2

error message: An Exception has ocurred while connecting (code 1015) log: none connection: closed