You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Examples of such functions inclde UdpSocket::bind and UdpSocket::send. Is the first address taken, the last, are all addresses taken into consideration...
Functions that take T: ToSocketAddrs in the std::net module take an object which will be converted to any number of actual SocketAddr types. It's not currently clear what these methods do when there are multiple socket addresses that are resolved to.
For example, TcpStream::connect will attempt to connect to each address in turn (returning the first that succeeds), but UdpSocket::send will only send a datagram to the first address. Furthermore, there are questions like should TcpListener::bind bind to all the addresses or just one?
Activity
steveklabnik commentedon Mar 8, 2015
I'm not 100% sure what this is asking, can you elaborate a bit, please?
alexcrichton commentedon Mar 8, 2015
Functions that take
T: ToSocketAddrs
in thestd::net
module take an object which will be converted to any number of actualSocketAddr
types. It's not currently clear what these methods do when there are multiple socket addresses that are resolved to.For example,
TcpStream::connect
will attempt to connect to each address in turn (returning the first that succeeds), butUdpSocket::send
will only send a datagram to the first address. Furthermore, there are questions like shouldTcpListener::bind
bind to all the addresses or just one?steveklabnik commentedon Mar 18, 2015
Is the current behavior the correct one? IE, do we even want to make that guarantee?
tbu- commentedon Mar 19, 2015
You could say what it does right now with a remark that it's not stabilized yet.
steveklabnik commentedon Apr 20, 2015
I'm removing the 'docs' tag until we decide what we want to specify here.
tbu- commentedon Apr 20, 2015
@steveklabnik Can you also remove the 'easy' tag?
Aatch commentedon Apr 8, 2016
Is this still relevant? I don't think we change anything related in a backwards-compatible way.
alexcrichton commentedon Apr 8, 2016
This is basically just a docs thing now, we need to be sure we specify what happens if multiple addresses are returned.
34 remaining items