Uh oh!
There was an error while loading. Please reload this page.
Add bind_reusablemethod to UdpSocket - #21480
Conversation
rust-highfive
commented
Jan 21, 2015
r? @pcwalton (rust_highfive has picked a reviewer for you, use r? to override) |
alexcrichton
commented
Jan 23, 2015
I made a similar comment on another PR, but I think that this may be best left off for now. We're actively redesigning the I/O system in a set of new RFCs. Currently one does not exist for We'll try to remember to handle this case as well, as I'm sure you're not the only one wanting this functionality! For now though I'm going to close this while we consider the new I/O system and we hope to have that RFC up soon! |
kali
commented
Feb 14, 2015
The new io is here, with no bind_reusable. Should we rebase/refactor this patch ? It would be a shame to freeze the io api with no reusable bind (it makes it impossible to implement things like SSDP and other multicast based protocol). |
danslapman
commented
Feb 15, 2015
Truly, @alexcrichton, I'm forced to support a fork of Rust with the only difference - "bind_reusable" :) |
alexcrichton
commented
Feb 16, 2015
@kali, @danslapman it is correct that there is currently no method for doing this, but this was explicitly discussed in the RFC. Adding this sort of behavior will likely not be done through a new These sorts of additions are definitely planned for, but are all backwards compatible extensions to the API. An RFC will be required, however, to add this new API as it was not explicitly designed in rust-lang/rfcs#807 |
kali
commented
Feb 16, 2015
Ok. Thanks for confirming this is still in the plan, and apologies for missing it in the monster io rfc. |
alexcrichton
commented
Feb 16, 2015
No worries! Even I often forget what's inside the RFCs... |
This implements
bind_reusablemethod for UdpSocket, which binds socket with SO_REUSEADDR set totrue. Such behaviour is necessary in some cases, such as monitoring multiple multicast streams on the same machine. See also #11758