Skip to content

Commit 3397282

Browse files
improve code sample for client 0-RTT data (#77)
1 parent 6e590f7 commit 3397282

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

content/docs/quic/client.md

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -88,10 +88,9 @@ tlsConf := &tls.Config{
8888
// 2. Dial another connection to the same server
8989
conn, err := tr.DialEarly(ctx, <server address>, tlsConf, <quic.Config>)
9090
// ... error handling
91-
// Check if 0-RTT is being used
92-
uses0RTT := conn.ConnectionState().Used0RTT
9391
// If 0-RTT was used, DialEarly returned immediately.
94-
// Open a stream and send some application data in 0-RTT ...
92+
// Otherwise, the handshake is performed, and DialEarly returns when the handshake completes.
93+
// Open a stream and send some application data...
9594
str, err := conn.OpenStream()
9695
```
9796

0 commit comments

Comments
 (0)