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 peek to TcpStream. #206

Merged
merged 2 commits into from
Jan 28, 2025
Merged

Add peek to TcpStream. #206

merged 2 commits into from
Jan 28, 2025

Conversation

nickgian
Copy link
Contributor

@nickgian nickgian commented Dec 30, 2024

Our codebase is using the peek functions that Turmoil does not model. It seemed easy to add so here's an attempt to add them for TCP.

@mcches
Copy link
Contributor

mcches commented Dec 30, 2024

I'll be out for a couple of days so my review will be delayed until later in the week. Adding @LucioFranco if you have availability.

I haven't looked yet, but we'll want to ensure #184 fits into whatever is added here.

@mcches mcches requested a review from LucioFranco December 30, 2024 18:33
@marcbowes
Copy link
Contributor

I'm taking a look at this now :)

- Ensure both peek + poll_peek have docs, and those docs match the tokio
ones.

- Add a trace point for peek
Copy link
Contributor

@marcbowes marcbowes left a comment

Choose a reason for hiding this comment

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

Thanks for the contribution and comprehensive tests!

@marcbowes marcbowes merged commit aa15f2f into tokio-rs:main Jan 28, 2025
4 checks passed
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