XSockets / XSockets.Clients

Realtime clients for XSockets.NET 4.*
MIT License
11 stars 9 forks source link

Not working with .NET 5.0 (Blazor) #20

Open lig76 opened 3 years ago

lig76 commented 3 years ago

Hi,

I have tried to use XSockets with Blazor using .NET5.0.

Unfortunately it doesn't work:

Unhandled exception rendering component: System.Net.NetworkInformation is not supported on this platform. System.PlatformNotSupportedException: System.Net.NetworkInformation is not supported on this platform. at System.Net.NetworkInformation.NetworkChange.add_NetworkAddressChanged(NetworkAddressChangedEventHandler value) at XSockets.XSocketClient.DefaultNetworkWatcher() at XSockets.XSocketClient.NetworkWatcher() at XSockets.XSocketClient..ctor(String url, String origin, String[] controllers)

uffebjorklund commented 3 years ago

@lig76 I assume that you tried that with https://www.nuget.org/packages/XSockets.Client/7.0.0-preview001 ? If so, feel free to do a pull request.

Have no estimate on when I will have the time to take a look at Blazor support

Regards, Uffe

lig76 commented 3 years ago

Yup, that is version 7.0.0.-preview001. I didn't even try older versions, they are 4 years old. And it sems that the problem is only with Blazor WASM Client. Blazor Servers works ok.