tlsSocket.setKeyCert(context)


tlsSocket.setKeyCert() 方法用于为套接字设置要使用的私钥和证书。如果你希望从 TLS 服务器的 ALPNCallback 中选择服务器证书,这个方法会非常有用。

【The tlsSocket.setKeyCert() method sets the private key and certificate to use for the socket. This is mainly useful if you wish to select a server certificate from a TLS server's ALPNCallback.】