kerryjiang / WebSocket4Net

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

Websocket is closed immediately after opening on Android #189

Open tungntEmotiv opened 2 years ago

tungntEmotiv commented 2 years ago

Hi @kerryjiang ,

The Websocket4Net is great library for websocket project. I have built a unity project on desktop use this library. Everything work well. But when i try to build my project for android( Redmi Note 10) . The websocket is opened but closed immediately without any error. Please see my configuration as below ` _wSC = new WebSocket("wss://localhost:12345"); _wSC.Security.AllowUnstrustedCertificate = true; _wSC.Security.AllowNameMismatchCertificate = true;

_wSC.Opened += new EventHandler(WebSocketClient_Opened); _wSC.Error += new EventHandler(WebSocketClient_Error); _wSC.Closed += WebSocketClient_Closed; _wSC.MessageReceived += WebSocketClient_MessageReceived; _wSC.DataReceived += WebSocketClient_DataReceived; ` I don't the configuration is enough. Could you help me ? Thanks

kerryjiang commented 2 weeks ago

Please try WebSocket4Net 1.0.0-beta.2. https://www.nuget.org/packages/WebSocket4Net/1.0.0-beta.2