-
Notifications
You must be signed in to change notification settings - Fork 284
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
Implement DSCP on udp connection #1868
base: master
Are you sure you want to change the base?
Conversation
core/vibe/core/drivers/libevent2.d
Outdated
static const IP_TOS = 3; | ||
} else version(Linux) | ||
{ | ||
import std.c.linux.socket : IP_ADD_MEMBERSHIP, IP_MULTICAST_LOOP; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
FYI: #1863 (std.c
is deprecated, but there's no replacement for these constants)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I came to the same conclusions. I have a unfinished PR laying around adding those and more to druntime. I just need to add all the different OSes.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Cool! Looking forward to it :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Bit stuck on the issue.
core/vibe/core/net.d
Outdated
Used for Quality of Service. 6bit number, higher is more priority. | ||
see https://www.iana.org/assignments/dscp-registry/dscp-registry.xhtml | ||
*/ | ||
void setDSCP(uint codePoint); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since this is unlikely to change on the protocol level, doesn't it make sense to use ubyte
here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, I suppose so. Using uint didn't feel right to me either. But neither did anything else. Will change it.
btw. I am also preparing a PR for event-core and vibe-core |
*/ | ||
void setDSCP(ubyte codePoint); | ||
|
||
/** Become member of IP multicast group |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A trailing space slipped in here.
The signatures in the win32 and libasync drivers still need to be updated to use |
Thanks, that would be great! |
Simple wrapper around setsockopt call to implement Differentiated Services Code Point. (see: https://en.wikipedia.org/wiki/Differentiated_services)