Skip to content

Conversation

jethrogb
Copy link

Add an implementation of futures::Sink to be able to send packets asynchronously. (UNIX only - I'm not too familiar with Windows).

The Sink API is a bit difficult to understand. This implementation is modeled after Unfold and IntoSink.

let mut guard = ready!(sink.inner.poll_write_ready_mut(cx))?;

if let Some(packet) = packet_storage.take() {
match guard.try_io(

Choose a reason for hiding this comment

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

Nitpick: this match is a bit hard to parse due to the closure. Consider create a separate variable for it.

@Wojtek242
Copy link
Collaborator

@jethrogb Thanks for the PR!

Could you please do the following so that I can merge this PR:

  1. Add a CHANGELOG entry,
  2. Fix clippy lints
  3. Add unit tests

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