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

feat: Better ergonomy for ack responses with custom AckStream struct #201

Merged
merged 51 commits into from
Jan 2, 2024

Conversation

Totodore
Copy link
Owner

@Totodore Totodore commented Dec 16, 2023

Replacement of the BoxStream<'static, Result<AckResponse<V>, AckError> to a custom AckStream that implement both Future (it will yield the first element). And Stream to poll every element.
Thanks to that combo the interface will be unified between :

  • Socket::emit_with_ack which sends to one socket and expect one ack.
  • Io::emit_with_ack which sends to all the sockets of the namespaces and expect n acks.
  • Operator::emit_with_ack which is doing both depending of the configuration.
  • Add tests and checks
  • Verify that every related API is coherent
  • Imrove documentation on related API functions
  • Add e2e-tests to the suite

@Totodore Totodore changed the title Feat: Better ergonomy for ack responses with custom AckStream struct Better ergonomy for ack responses with custom AckStream struct Dec 16, 2023
@Totodore Totodore added enhancement A-socketioxide Area related to socketioxide labels Dec 16, 2023
@Totodore
Copy link
Owner Author

Blocked by 1c3t3a/rust-socketio#385 for ack testing.

@Totodore Totodore marked this pull request as ready for review December 25, 2023 14:41
@Totodore Totodore changed the title Better ergonomy for ack responses with custom AckStream struct feat: Better ergonomy for ack responses with custom AckStream struct Dec 25, 2023
@Totodore Totodore changed the base branch from prepare-v0.10 to main December 25, 2023 14:42
@Totodore Totodore linked an issue Dec 29, 2023 that may be closed by this pull request
@Totodore Totodore merged commit 87b8195 into main Jan 2, 2024
12 checks passed
@Totodore Totodore deleted the feat-ack-stream branch January 10, 2024 14:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-socketioxide Area related to socketioxide
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

SocketRef inside AckResponses
2 participants