session.onqlog


  • 类型:quic.OnQlogCallback

当 qlog 数据可用时调用的回调。要求 sessionOptions.qlogtrue。回调接收一个字符串块格式的 JSON-序列 qlog 数据和一个布尔 fin 标志。当 fintrue 时,该块是此会话的最终 qlog 输出,连接的块形成完整的 qlog 跟踪。可读/可写。

🌐 The callback to invoke when qlog data is available. Requires sessionOptions.qlog to be true. The callback receives a string chunk of JSON-SEQ formatted qlog data and a boolean fin flag. When fin is true, the chunk is the final qlog output for this session and the concatenated chunks form a complete qlog trace. Read/write.

Qlog 数据在连接生命周期中到达。第一个数据块包含带有格式元数据的 qlog 头。后续数据块包含跟踪事件。最后一个数据块(其中 fin 设置为 true)在会话销毁期间发出,并完成 JSON-SEQ 输出。

🌐 Qlog data arrives during the connection lifecycle. The first chunk contains the qlog header with format metadata. Subsequent chunks contain trace events. The final chunk (with fin set to true) is emitted during session destruction and completes the JSON-SEQ output.

也可以通过 quic.connect()quic.listen() 中的 onqlog 选项进行设置。

🌐 Can also be set via the onqlog option in quic.connect() or quic.listen().