session.opened


  • 类型:<Promise> 用于 <Object>
    • local <net.SocketAddress> 本地套接字地址。
    • remote <net.SocketAddress> 远程套接字地址。
    • servername <string> 在握手过程中协商的 SNI 服务器名称。
    • protocol <string> 在握手期间协商的 ALPN 协议。
    • cipher <string> 协商的 TLS 密码套件的名称。
    • cipherVersion <string> 密码套件的 TLS 协议版本(例如,'TLSv1.3')。
    • validationErrorReason <string> 如果证书验证失败,返回原因字符串。如果验证成功,则返回空字符串。
    • validationErrorCode <number> 如果证书验证失败,则显示错误代码。如果验证成功,则为 0
    • earlyDataAttempted <boolean> 是否尝试了 0-RTT 早期数据。
    • earlyDataAccepted <boolean> 服务器是否接受了 0-RTT 提前数据。

一个在 TLS 握手成功完成后会被履行的承诺。解析后的值包含有关已建立会话的信息,包括协商的协议、密码套件、证书验证状态以及 0-RTT 早期数据状态。

🌐 A promise that is fulfilled once the TLS handshake completes successfully. The resolved value contains information about the established session including the negotiated protocol, cipher suite, certificate validation status, and 0-RTT early data status.

如果握手失败或会话在握手完成之前被销毁,该承诺将被拒绝。

🌐 If the handshake fails or the session is destroyed before the handshake completes, the promise will be rejected.