Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SocketException running on AspNet Core on Linux #83

Open
tessarolli opened this issue Jul 31, 2018 · 2 comments
Open

SocketException running on AspNet Core on Linux #83

tessarolli opened this issue Jul 31, 2018 · 2 comments

Comments

@tessarolli
Copy link

This code works fine on windows, but throws this error on linux.

I'm suspecting I might be missing some .deb's on the linux box, but not sure how to find out which..

Can you help me?

Thanks

Exception:
Unhandled Exception: System.Net.Sockets.SocketException: Protocol not available
at System.Net.Sockets.Socket.UpdateStatusAfterSocketErrorAndThrowException(SocketError error, String callerName)
at System.Net.Sockets.Socket.SetSocketOption(SocketOptionLevel optionLevel, SocketOptionName optionName, Int32 optionValue, Boolean silent)
at System.Net.Sockets.Socket.SetSocketOption(SocketOptionLevel optionLevel, SocketOptionName optionName, Int32 optionValue)
at Rssdp.SocketFactory.CreateUdpMulticastSocket(Int32 multicastTimeToLive, Int32 localPort)
at Rssdp.Infrastructure.SsdpCommunicationsServer.BeginListeningForBroadcasts()
at Rssdp.Infrastructure.SsdpDevicePublisherBase..ctor(ISsdpCommunicationsServer communicationsServer, String osName, String osVersion, ISsdpLogger log)
at TessarolliSolutions.Zeus.Program.Main(String[] args) in C:\VSTS\TS\src\Zeus API\Zeus\Program.cs:line 69

Code:
_Publisher = new SsdpDevicePublisher(new SsdpCommunicationsServer(new SocketFactory(HardwareInfo.GetIPAddress().ToString())));
_Publisher.StandardsMode = SsdpStandardsMode.Relaxed;
_Publisher.AddDevice(PublishDevice());

@Yortw
Copy link
Owner

Yortw commented Jul 31, 2018

Hi,

The only protocol I'm aware this needs is UDP. I'm afraid I'm not familiar with Linux, 'debs' or mono, and have no device(s) on which to test this so I'm not much help.

If there is a 'deb' to add UDP support then I guess try installing that, otherwise perhaps try Googling for that error details and mono and .net.

@Yortw
Copy link
Owner

Yortw commented Jul 31, 2018

Sorry, that is not totally accurate... UDP is used primarily, but also HTTP which also requires TCP. In the error above it looks like (multicast) UDP is what is trying to be accessed though.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants