1 # WebTransportSessionProxy
3 WebTransportSessionProxy is introduced to enable the creation of a Http3WebTransportSession and coordination of actions that are performed on the main thread and on the socket thread.
5 WebTransportSessionProxy can be in different states and the following diagram depicts the transition between the states. “MT” and “ST” mean: the action is happening on the main and socket thread. More details about this class can be found in [WebTransportSessionProxy.h](https://searchfox.org/mozilla-central/source/netwerk/protocol/webtransport/WebTransportSessionProxy.h).
9 A[INIT] -->|"nsIWebTransport::AsyncConnect; MT"| B[NEGOTIATING]
10 B -->|"200 response; ST"| C[NEGOTIATING_SUCCEEDED]
11 B -->|"nsHttpChannel::OnStart/OnStop failed; MT"| D[DONE]
12 B -->|"nsIWebTransport::CloseSession; MT"| D
13 C -->|"nsHttpChannel::OnStart/OnStop failed; MT"| F[SESSION_CLOSE_PENDING]
14 C -->|"nsHttpChannel::OnStart/OnStop succeeded; MT"| E[ACTIVE]
15 E -->|"nsIWebTransport::CloseSession; MT"| F
16 E -->|"The peer closed the session or HTTP/3 connection error; ST"| G[CLOSE_CALLBACK_PENDING]
17 F -->|"CloseSessionInternal called, The peer closed the session or HTTP/3 connection error; ST"| D
18 G -->|"CallOnSessionClosed or nsIWebTransport::CloseSession; MT"| D