kerryjiang / WebSocket4Net

A popular .NET WebSocket Client
752 stars 272 forks source link

wss HTTP/1.1 101 #157

Open cfz1025 opened 4 years ago

cfz1025 commented 4 years ago

follow is my code:
m_WebSocket = new WebSocket(webSocketUrl); m_WebSocket.Opened += new EventHandler(m_WebSocket_Opened); m_WebSocket.MessageReceived += new EventHandler(m_WebSocket_MessageReceived); m_WebSocket.Error += new EventHandler(m_WebSocket_Error); m_WebSocket.Closed += new EventHandler(m_WebSocket_Closed); m_WebSocket.Open(); i use wss in C# wpf project, but this result is "HTTP/1.1 101 "

stefxx commented 3 years ago

Hi!

I know this is an old issue, but I am facing the exact same problem. I get an "HTTP/1.1 101" on the Error Eventhandler, followed by an Closed event. Since 101 means "switching protocols", I would think this is expected and should not lead to an error and disconnection.

I am using WebSocket4Net 14.1. Thanks!

alexnum commented 3 years ago

Same here