-
Notifications
You must be signed in to change notification settings - Fork 11
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
Support IPv4 and IPv6 at same socket #14
Comments
Ah, good catch. I haven't been able to test with IPv6 yet, i'll get onto that soon. |
I have a pull request coming up... Just cannot figure out how to create
unit tests
…On Fri, Aug 24, 2018 at 11:50 AM, Roman Vaughan ***@***.***> wrote:
Ah, good catch. I haven't been able to test with IPv6 yet, i'll get onto
that soon.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#14 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ADvRrX7S2cXrfG_Pj1RnOHT_KsuPpo5aks5uT8xjgaJpZM4WLD9g>
.
|
If you submit what you have so far as a PR, i can investigate the tests |
I'm testing the out of the box client and server with your merged changes under VS2019. I'm getting a curious exception related to the section of code that was changed above (I think). System.Net.Sockets.SocketException: 'An invalid argument was supplied' This happens immediately when the client tries to send the hello put to the server. The full stack trace I get in my client window is this: Exception caught: System.Net.Sockets.SocketException (0x80004005): An invalid argument was supplied Press to exit Do you have any insights for this? I haven't looked into it yet unfortunately. I'm just shopping for .net coap libraries. I'm a little surprised the demo client/server didn't work out of the box. Thoughts? |
It is due to the client tries to bind twice to the same endpoint in two different threads. I don't know why |
Current implementation of CoapUdpEndPoint does not support IPv4 and IPv6 at the same time.
Actually the default constructor CoapUdpEndPoint is hardcoded to IPv4 with the IPAddress.Any (Any means IPv4 and IPv6Any means IPv6)
The samples was ailing due to this, so I set out to figure out why and lean myself. So I wrote a blog post:
http://www.lybecker.com/blog/2018/08/23/supporting-ipv4-and-ipv6-dual-mode-network-with-one-socket/
The text was updated successfully, but these errors were encountered: