Skip to content

Commit

Permalink
Prioritize outgoing datagrams over stream data
Browse files Browse the repository at this point in the history
Discussed at #62. Explicitly state that outgoing datagrams are
prioritized for now. We will introduce a way to change this
default behavior, as part of the prioritization API.
  • Loading branch information
yutakahirano committed Aug 31, 2021
1 parent f0d9aa6 commit 4122fe6
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions index.bs
Original file line number Diff line number Diff line change
Expand Up @@ -1212,6 +1212,9 @@ To <dfn for="SendStream">write</dfn> |chunk| to a {{SendStream}} |stream|, run t
1. Let |bytes| be a copy of the [=byte sequence=] which |chunk| represents.
1. Set |stream|'s [=[[PendingOperation]]=] to |promise|.
1. Return |promise| and run the remaining steps [=in parallel=].
1. Wait for |transport|'s [=[[Datagrams]]=]'s [=[[OutgoingDatagramsQueue]]=] to be empty.

Note: This means outgoing datagrams are prioritized over stream data.
1. [=stream/Send=] |bytes| on |stream|'s [=[[InternalStream]]=] and wait for the operation to
complete.
1. [=Queue a network task=] with |transport| to run these steps:
Expand Down

0 comments on commit 4122fe6

Please sign in to comment.