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

refactor: QUIC datagram #214

Merged
merged 4 commits into from
Sep 8, 2023
Merged

Conversation

qzhuyan
Copy link
Collaborator

@qzhuyan qzhuyan commented Sep 7, 2023

Refactor dgram events, this is a breaking change.

Make dgram events follow others event format 4-element tuple.

  • dgram send state event
    Old code only report success of sending but not other progressing states (discard, cancelled, waiting ack ...)
    This PR makes it report any progress state so that application could get feedback quickly and react on it quickly.

  • dgram state event
    Old code only reports when it is enabled.
    This PR makes it also reports when it is disabled also with max_len for application layer feedback loop.

  • dgram received data event
    use 4 elements tuples format. It looks like a stream data recv event but with connection handle.

Need followups:

  1. Since this PR makes quicer emit more dgram related events which should be masked by a send opt.
  2. Behavior module need to be updated for handling these events and do callbacks.

@qzhuyan qzhuyan marked this pull request as ready for review September 7, 2023 13:52
{ok, _Len} = OK ->
receive
{quic, send_dgram_completed, Conn} ->
OK
{quic, dgram_send_state, Conn, #{state := ?QUIC_DATAGRAM_SEND_SENT}} ->
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

these are not nice, we could intro some dgram event mask for caller to skip uninterested events. also intro async_send_dgram.

@qzhuyan qzhuyan merged commit a93004e into emqx:main Sep 8, 2023
18 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.

2 participants