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

Implement AsRawFd for AddrStream behind feature flag? #2245

Closed
tedsta opened this issue Jul 14, 2020 · 1 comment · Fixed by differs/Legends#5
Closed

Implement AsRawFd for AddrStream behind feature flag? #2245

tedsta opened this issue Jul 14, 2020 · 1 comment · Fixed by differs/Legends#5
Labels
A-server Area: server. C-feature Category: feature. This is adding a new feature. E-easy Effort: easy. A task that would be a great starting point for a new contributor.

Comments

@tedsta
Copy link
Contributor

tedsta commented Jul 14, 2020

Hi, I have a use-case where I want to access the file descriptor of a long-lived stream (it becomes a websocket) for monitoring purposes (specifically linux's send-q stat, the amount of unacknowledged outbound bytes) - see here.

Would you be ok with implementing AsRawFd for AddrStream, maybe behind a feature flag? Or otherwise provide a way to get a &tokio::net::TcpStream from a &AddrStream? If it helps and you are open to it I can prepare a PR.

@seanmonstar seanmonstar added A-server Area: server. E-easy Effort: easy. A task that would be a great starting point for a new contributor. C-feature Category: feature. This is adding a new feature. labels Jul 14, 2020
@seanmonstar
Copy link
Member

Seems fair and simple to me (Adding AsRawFd support on Linux.)

tedsta added a commit to tedsta/hyper that referenced this issue Jul 16, 2020
tedsta added a commit to tedsta/hyper that referenced this issue Jul 16, 2020
BenxiangGe pushed a commit to BenxiangGe/hyper that referenced this issue Jul 26, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-server Area: server. C-feature Category: feature. This is adding a new feature. E-easy Effort: easy. A task that would be a great starting point for a new contributor.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants