【发布时间】:2012-07-15 03:20:21
【问题描述】:
我正在尝试通过 Nodejs 建立与 chat.facebook.com 端口:5222 的 TLS 套接字连接。 我使用以下代码:
var a=require('tls');
var b=a.connect(5222,'chat.facebook.com',function(){console.log("connected");});
b.on('error',function(error){console.log(error);})
但它没有连接,而是报错:
[Error: 140089045411648:error:140770FC:SSL routines:SSL23_GET_SERVER_HELLO:unknown protocol:../deps/openssl/openssl/ssl/s23_clnt.c:683:]
我尝试了与 encrypted.google.com:443 的类似连接,控制台很容易触发“已连接”。
有人可以指导我我错过了什么或可以做些什么来克服这个问题。
【问题讨论】: