TsgcHTTP3Server › Events

TsgcHTTP3Server Events

Events you can handle, grouped by purpose, followed by the full alphabetical list.

All these events are raised on the server's background listener thread, so a handler must not touch the UI directly and should return quickly, since the connection is not serviced while it runs.

Server lifecycle

NameDescription
OnStartupFires after the HTTP/3 listener has started. Inherited from TsgcQUICServer.
OnShutdownFires after the HTTP/3 listener has stopped. Inherited from TsgcQUICServer.

Connection

NameDescription
OnH3ConnectFires when a client establishes an HTTP/3 connection.
OnH3DisconnectFires when an HTTP/3 connection is closed.
OnH3ExceptionFires when an exception is raised while servicing an HTTP/3 connection, including a peer protocol violation and its HTTP/3 error code.

Requests

NameDescription
OnH3RequestFires when a complete HTTP/3 request is received so the application can fill the response. This is where a server is written.

CONNECT tunnels and WebTransport

NameDescription
OnH3TunnelDataFires when payload arrives on an established CONNECT tunnel stream.
OnWebTransportSessionFires when a peer requests a WebTransport session through an Extended CONNECT, so it can be accepted or rejected. Requires SGC_WEBTRANSPORT.

Inherited from TsgcQUICServer (used internally)

Do not assign these events on an HTTP/3 server. TsgcHTTP3Server inherits the QUIC transport events from TsgcQUICServer, but its constructor wires them to its own handlers in order to drive the HTTP/3 layer: they are how the component receives connections and stream bytes and turns them into requests. Assigning your own handler replaces that wiring and breaks the server. Use the OnH3 events above instead, which report the same facts at the HTTP/3 level.

NameDescription
OnQUICConnectQUIC transport connect. Consumed internally. Use OnH3Connect.
OnQUICDataQUIC transport data. Consumed internally to parse HTTP/3 frames.
OnQUICDisconnectQUIC transport disconnect. Consumed internally. Use OnH3Disconnect.
OnQUICExceptionQUIC transport exception. Wired internally only when it is still unassigned, so that HTTP/3 errors surface through OnH3Exception. Assigning it suppresses OnH3Exception.

All Events (alphabetical)

NameDescription
OnH3ConnectFires when a client establishes an HTTP/3 connection.
OnH3DisconnectFires when an HTTP/3 connection is closed.
OnH3ExceptionFires when an exception is raised while servicing an HTTP/3 connection.
OnH3RequestFires when a complete HTTP/3 request is received so the application can fill the response.
OnH3TunnelDataFires when payload arrives on an established CONNECT tunnel stream.
OnQUICConnectQUIC transport connect. Inherited from TsgcQUICServer and consumed internally; do not assign.
OnQUICDataQUIC transport data. Inherited from TsgcQUICServer and consumed internally; do not assign.
OnQUICDisconnectQUIC transport disconnect. Inherited from TsgcQUICServer and consumed internally; do not assign.
OnQUICExceptionQUIC transport exception. Inherited from TsgcQUICServer and wired internally; do not assign.
OnShutdownFires after the HTTP/3 listener has stopped. Inherited from TsgcQUICServer.
OnStartupFires after the HTTP/3 listener has started. Inherited from TsgcQUICServer.
OnWebTransportSessionFires when a peer requests a WebTransport session through an Extended CONNECT.