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

Support for UDP / datagram sockets #31

Open
leostera opened this issue Jan 1, 2024 · 2 comments
Open

Support for UDP / datagram sockets #31

leostera opened this issue Jan 1, 2024 · 2 comments
Labels
enhancement New feature or request good first issue Good for newcomers help wanted Extra attention is needed

Comments

@leostera
Copy link
Collaborator

leostera commented Jan 1, 2024

At the moment only TCP sockets are nicely supported, but I've had folks reach out with UDP use-cases so it'd be a good idea to at least have basic support for it.

Implementation Notes

So we'd need to extend the riot/runtime/net/addr.ml to make a distinction between unix / datagram / stream sockets with something like:

type datagram_addr = [ `Udp of ip_addr * int | `Unix of string ]
type stream_addr = [ `Tcp of ip_addr * int | `Unix of string ]

And then amend all the functions and interfaces, including riot/lib/net.ml which has a user-facing Addr module with functions like get_info.

Testing Ideas

I'm not very well versed in UDP tbh, so I'm very open to ideas on how to test the correctness and robustness of this. One thought would be to see if we can implement a low-level protocol like Wake-On-LAN as a test, if its not too much work.

@leostera leostera added enhancement New feature or request help wanted Extra attention is needed good first issue Good for newcomers labels Jan 1, 2024
@wonbyte
Copy link
Contributor

wonbyte commented Jan 5, 2024

dibs!

@wonbyte
Copy link
Contributor

wonbyte commented Jan 5, 2024

I feel like we can lean on this as it's only implemented in UDP: https://github.com/EmilHernvall/dnsguide as well as the real project: https://github.com/EmilHernvall/hermes

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants