Skip to content

Commit 6442799

Browse files
committed
Specify control stream protocol id
1 parent c4217cd commit 6442799

1 file changed

Lines changed: 12 additions & 15 deletions

File tree

datagrams/datagrams.md

Lines changed: 12 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -47,21 +47,18 @@ send datagrams.
4747
## Datagrams on QUIC
4848

4949
Each datagram flow MUST be associated with a control stream. A datagram flow is
50-
defined as a logical flow of datagrams for a specific application protocol. A
51-
control stream is a QUIC bidirectional stream that has negotiated the application
52-
protocol ID. The control stream MUST stay open for the duration of the datagram
53-
flow. Implementation MAY create the control stream and start sending datagrams
54-
at once.
55-
56-
There is currently no other use for the control stream besides negotiating the
57-
application protocol ID.
58-
59-
Receipt of a QUIC DATAGRAM frame whose payload is too short to allow parsing the
60-
Control Stream ID field MUST be treated as a connection error of type
61-
PROTOCOL_VIOLATION (0x1003).
62-
63-
libp2p datagrams MUST NOT be sent unless the control stream's send side is
64-
open. If a datagram is received after the corresponding stream's receive side is
50+
defined as a logical flow of datagrams related to a specific application
51+
protocol. A control stream is a QUIC bidirectional stream that has negotiated
52+
the libp2p datagram control stream protocol ID `/dg/1`. The initiator MUST send
53+
the related application protocol ID related to the datagram flow after
54+
negotiating the control stream. The control stream MUST stay open for the
55+
duration of the datagram flow. Implementation MAY create the control stream and
56+
start sending datagrams at once. There is currently no other use for the control
57+
stream besides negotiating the application protocol ID. Receipt of a QUIC
58+
DATAGRAM frame whose payload is too short to allow parsing the Control Stream ID
59+
field MUST be treated as a connection error of type PROTOCOL_VIOLATION (0x1003).
60+
libp2p datagrams MUST NOT be sent unless the control stream's send side is open.
61+
If a datagram is received after the corresponding stream's receive side is
6562
closed, the received datagrams MUST be silently dropped.
6663

6764
If a libp2p datagram is received and its Control Stream ID field maps to a

0 commit comments

Comments
 (0)