Com-AugustCellars / CoAP-CSharp

CoAP Implementation in C#
Other
41 stars 19 forks source link

Socket configuration not supported in Xamarin on Android #86

Open SittenSpynne opened 3 years ago

SittenSpynne commented 3 years ago

I'm interested in writing a mobile application that communicates with some devices using this library. I'm doing some quick hacking to get a feel for it and ran into an error right away. Upon attempting to send a request on an Android device, I get a SocketException with message "Protocol option not supported."

This seems to originate in UDPChannel.cs in SetupUDPSocket(). The socket option "Packet Information" is set, but it seems Xamarin is reporting this isn't supported. If I clone the code and comment this line out, everything seems to work, but I don't understand what this option does so I don't have a good way to know what I should be testing to see if it matters.