【发布时间】:2013-06-15 22:00:02
【问题描述】:
我正在尝试在我的服务器和 Google 云连接服务器 (CCS) 之间打开 XMPP 连接,但它不起作用。我正在使用 PHP 编程并使用 JAXL 库。这是我的代码:
<?php
include_once 'jaxl.php';
$client = new JAXL(array(
'jid'=>'<my_sender_ID>@gcm.googleapis.com',
'pass'=>'my_API_key',
'auth_type'=>'PLAIN',
'host' => 'gcm.googleapis.com',
'port' => '5235',
'force_tls' => true
));
$client->start();
echo "done";
?>
然后我得到这个错误:
unable to connect tcp://gcm.googleapis.com:5235 with error no: 110, error str: Connection timed out
我做错了什么?
【问题讨论】:
-
从纯网络的角度来看
Connection timed out通常意味着连接问题,所以我会检查 PING 和防火墙,并可能使用 NMAP 来查看端口 5235 是否可以访问。
标签: php android push-notification xmpp google-cloud-messaging