WebTransportSessionProxy¶
WebTransportSessionProxy 用于启用 Http3WebTransportSession 的创建,并协调在主线程和套接字线程上执行的操作。
WebTransportSessionProxy 可以处于不同的状态,下图描述了状态之间的转换。“MT” 和“ST” 分别表示:操作发生在主线程和套接字线程上。有关此类的更多详细信息,请参阅 WebTransportSessionProxy.h。
graph TD A[INIT] -->|"nsIWebTransport::AsyncConnect; MT"| B[NEGOTIATING] B -->|"200 response; ST"| C[NEGOTIATING_SUCCEEDED] B -->|"nsHttpChannel::OnStart/OnStop failed; MT"| D[DONE] B -->|"nsIWebTransport::CloseSession; MT"| D C -->|"nsHttpChannel::OnStart/OnStop failed; MT"| F[SESSION_CLOSE_PENDING] C -->|"nsHttpChannel::OnStart/OnStop succeeded; MT"| E[ACTIVE] E -->|"nsIWebTransport::CloseSession; MT"| F E -->|"The peer closed the session or HTTP/3 connection error; ST"| G[CLOSE_CALLBACK_PENDING] F -->|"CloseSessionInternal called, The peer closed the session or HTTP/3 connection error; ST"| D G -->|"CallOnSessionClosed or nsIWebTransport::CloseSession; MT"| D