Skip to content

Commit

Permalink
some progress
Browse files Browse the repository at this point in the history
  • Loading branch information
marten-seemann authored Apr 1, 2024
1 parent e6ad67b commit 6c9b9e3
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions content/docs/webtransport/session.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,17 @@ toc: true
weight: 3
---

A WebTransport Session is the equivalent of a [QUIC Connection]({{< relref "../quic/connection.md" }}): It allows opening and accepting streams, and sending and receiving of datagrams.

The API exposed of the `webtransport.Session` is _almost_ identical to the `quic.Connection`, with a few minor differences: For example, QUIC allows streams to be reset using a 62-bit error code, whereas WebTransport limits the error code range to 32 bits.

## Closing a WebTransport Session

The WebTransport session can be closed by calling the `CloseWithError` method. **TODO: expand and give a code sample**

Of course, the underlying QUIC connection could also be closed for a number of reasons, so any of the errors described in the [error assertion]({{< relref "../quic/connection.md#error-assertion" }}) might occur as well.


## 📝 Future Work

* WebTransport Datagrams: [#8](https://github.com/quic-go/webtransport-go/issues/8)

0 comments on commit 6c9b9e3

Please sign in to comment.