-
-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
net: allow customized I/O operations for TcpStream (#3873) #3888
Conversation
- ref #555 - imperfect until tokio-rs/tokio#3888 was merged
- ref #555 - imperfect until tokio-rs/tokio#3888 was merged
- ref #555 - imperfect until tokio-rs/tokio#3888 was merged
- ref #555 - imperfect until tokio-rs/tokio#3888 was merged
- ref #555 - imperfect until tokio-rs/tokio#3888 was merged
- ref #555 - imperfect until tokio-rs/tokio#3888 was merged
Why |
- ref #555 - imperfect until tokio-rs/tokio#3888 was merged
This comment has been minimized.
This comment has been minimized.
Done. I am not exposing |
- ref #555 - imperfect until tokio-rs/tokio#3888 was merged
- ref #555 - imperfect until tokio-rs/tokio#3888 was merged
- ref #555 - imperfect until tokio-rs/tokio#3888 was merged
- ref #555 - imperfect until tokio-rs/tokio#3888 was merged
- ref #555 - imperfect until tokio-rs/tokio#3888 was merged
- ref #555 - imperfect until tokio-rs/tokio#3888 was merged
@Darksonn Please take a look again at this simple PR. |
It isn't so simple. We have to think about the shape of the methods to make sure that we don't regret adding these methods. Additionally, if we do want them, we would also want them on |
@Darksonn It has been a week, what's the status? What can I do for help, for example, adding |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think the suggested API looks ok except that it should use FnOnce
, not FnMut
.
That would be great. We would want it on all of the socket types. |
Copy & Paste these methods to |
There are also two more socket types in the named pipe module. |
It seems like changes were made to the named pipe file after you first submitted this PR. Can you merge or rebase on master? |
Of course. Are there any other modifications have to be made? |
There is also a |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Besides these (and similar in other files), the documentation looks good 👍
I would not weigh the current There are a lot of new functions proposed here. Can you tell me why we need to add many new functions instead of a single |
Just 4 functions for each network I/O structs:
All the original network I/O structs, like
All of these functions except The The |
I think I agree that taking out the |
Ok. Let me remove them. |
@Darksonn @carllerche Any other changes have to be made for this PR? |
The implementation and documentation seems fine. I don't have any other changes at the moment. Thanks for being patient with the large list of changes. I'd like to discuss with @carllerche, but it's currently a holiday in the US. |
Still waiting @carllerche . |
Co-authored-by: Alice Ryhl <alice@ryhl.io>
Co-authored-by: Alice Ryhl <alice@ryhl.io>
I talked with @carllerche. I think we would prefer to merge them into a single |
Done. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for your patience with the many changes.
I would advice to squash all these commits to one when merging this PR. |
All PRs are squashed on merge. |
Excellent! When will be the next release? @Darksonn |
Our aim is once every two weeks, so probably next week. Currently we have only your change and #3273. |
- ref shadowsocks#555 - imperfect until tokio-rs/tokio#3888 was merged
Motivation
#3873
Solution
Exposes two APIs from the underlying
registration
,poll_read_io
try_read_io
,poll_write_io
try_write_io