std/socket: Use 0 as default protocol number#1265
std/socket: Use 0 as default protocol number#1265iacore wants to merge 3 commits intonim-works:develfrom
Conversation
65b485e to
5e3aad2
Compare
|
I forgot to mark this branch as ready for review. |
|
it doesn't pass ci and the pr message isn't even attempted at, this isn't ready for review. |
|
Is it now ready for review? |
|
Please elaborate on why you want to make this change. |
|
If I want to use UDP, the default protocol number is wrong. Berkeley socket API says default protocol should be 0. |
saem
left a comment
There was a problem hiding this comment.
Can you describe not just the change, but what's the reasoning for the change. The net module is meant for cross-platform socket interface, posix alone isn't that, so simply saying that's what it recommends doesn't make sense across all platforms, at least at first glance.
I don't need fancy prose, feel free to use bullet points or whatever makes it easier. But at this point I'd have to do a deep dive across platforms and the various APIs, refresh my understanding the module design as it is today, then reason through the changes made and guess as to what you're thinking. If that's what you're expecting I don't see most people having time to do that any time soon.
There was a problem hiding this comment.
I don't know why it ended up there
Summary
Notes for Reviewers
Prior as nim-lang/Nim#19674.
I don't know what I am doing. I only know that the default protocol number should be 0 (default protocol for AF & socket type, to be determined by the OS).
nativesocket.nimhas a lot of duplicated code that could be simplified with meta-programming techniques. We should clean that up.