Add getsockname shim for connecting and connected sockets#4985
Add getsockname shim for connecting and connected sockets#4985WhySoBad wants to merge 6 commits intorust-lang:masterfrom
getsockname shim for connecting and connected sockets#4985Conversation
|
Thank you for contributing to Miri! A reviewer will take a look at your PR, typically within a week or two. |
| // Because the bound address could be of any local interface, we cannot | ||
| // test for localhost. |
There was a problem hiding this comment.
The socket API would let us bind before calling connect to set the local address, right?
But I guess that's not implemented yet / can't even be implemented with the mio API?
There was a problem hiding this comment.
Yes, the socket API allows to do this but we cannot represent this with mio because we only have TcpStream::connect there.
|
Reminder, once the PR becomes ready for a review, use |
|
@rustbot ready |
This comment has been minimized.
This comment has been minimized.
b1ab66a to
c748fb7
Compare
|
This PR was rebased onto a different master commit. Here's a range-diff highlighting what actually changed. Rebasing is a normal part of keeping PRs up to date, so no action is needed—this note is just to help reviewers. |
Hi,
This pull request adds the
getsocknameshim for connecting and connected sockets. At the moment, we just return0.0.0.0in those cases but because connecting sockets are already locally bound we can just return the value fromTcpStream::local_addr.