sta / websocket-sharp

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

Net6 #712

Open emwanwei163 opened 2 years ago

emwanwei163 commented 2 years ago

.NET 6 support

schodemeiss commented 1 year ago

This would be great to get merged in. Supports older .NET Framework and very current .NET (Core). I'm hitting an exception of:

System.PlatformNotSupportedException: Operation is not supported on this platform.
   at System.Action`4.BeginInvoke(T1 arg1, T2 arg2, T3 arg3, T4 arg4, AsyncCallback callback, Object object)
   at WebSocketSharp.WebSocket.closeAsync(CloseEventArgs e, Boolean send, Boolean receive, Boolean received)
   at WebSocketSharp.WebSocket.CloseAsync(CloseStatusCode code)

Which is caused due to the outdated BeginInvoke usages.

I notice all these other issues mentioned the same problem. Maybe it's time for a fix?

https://github.com/sta/websocket-sharp/issues/412 https://github.com/sta/websocket-sharp/issues/473 https://github.com/sta/websocket-sharp/issues/487 https://github.com/sta/websocket-sharp/issues/601 https://github.com/sta/websocket-sharp/issues/652

Misiu commented 1 year ago

@sta any updates?

DavidDBD commented 1 year ago

I'd like to add in my vote for this - I recently upgraded a project that I rely on to .net 6 and am running into issues.

CosmicStud commented 1 year ago

I think it's now between updating backward compatibility only or moving to the newer compatibility but losing older device support.

Or possibly updating both versions simultaneously in the future. Not all devices or IDE's support Net6 yet unfortunately. Maybe another 5-10 years.