Skip to content
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

Add into_inner to AddrStream #1762

Merged
merged 1 commit into from
Feb 11, 2019

Conversation

luben
Copy link
Contributor

@luben luben commented Feb 11, 2019

It consumes the AddrStream and returns the underlying TcpStream.

@@ -219,6 +219,12 @@ mod addr_stream {
pub fn remote_addr(&self) -> SocketAddr {
self.remote_addr
}

/// Consumes the AddrStream and return the underlying IO object
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy editing nit: ”Consumes the AddrStream and returns the underlying IO object“

@davidbarsky
Copy link
Contributor

I think these changes are good! I think it'll require @seanmonstar's sign-off, but I'm not opposed to this.

It consumes the `AddrStream` and returns the underlying TcpStream.
@luben
Copy link
Contributor Author

luben commented Feb 11, 2019

Thanks David, corrected it.

@seanmonstar
Copy link
Member

I'm not opposed, but while we wait for CI, I'm curious to hear what use case you have that needed this :D

@luben
Copy link
Contributor Author

luben commented Feb 11, 2019

I wanted to to an "upgrade" and get hands on the raw fd. Then redirect my stderr there. Obviously I needed some other logging around, including the remote address. I tried to do it with the low-level server::conn API but I couldn't get my head around how to do the upgrades.

@seanmonstar seanmonstar merged commit e52f80d into hyperium:master Feb 11, 2019
@seanmonstar
Copy link
Member

Makes sense, thanks!

@luben
Copy link
Contributor Author

luben commented Feb 11, 2019

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants