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 split method to UnixDatagram #1757

Closed
wants to merge 1 commit into from

Conversation

jean-airoldie
Copy link
Contributor

Motivation

This allows a user to both
receive and send datagram at the same time on the same socket.

Solution

This adds a split method for UnixDatagram as well as the
SendHalf and RecvHalf types. This essentially the same principle that is applied for ReadHalf and WriteHalf returned by the UnixStream::split method.

@carllerche
Copy link
Member

Thanks 👍 his is great. Unfortunately, the PR needs to be updated to merge into master, but the change looks good to me.

The main difference is that split is no longer a public mod, so RecvHalf and SendHalf will need to be exported from net::unix.

This adds a split method for `UnixDatagram` as well as the
SendHalf and RecvHalf types. This allows a user to both
receive and send datagram at the same time on the same socket.
@Darksonn Darksonn added A-tokio Area: The main tokio crate C-enhancement Category: A PR with an enhancement or bugfix. M-net Module: tokio/net labels May 22, 2020
@Darksonn
Copy link
Contributor

Closing in favor of #2687.

@Darksonn Darksonn closed this Jul 25, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-tokio Area: The main tokio crate C-enhancement Category: A PR with an enhancement or bugfix. M-net Module: tokio/net
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants