【发布时间】:2023-08-04 18:10:01
【问题描述】:
代码
try {
$stomp = new Stomp('tcp://xx:xxx:xxx:xxx:61616','admin','admin');
// connection to remote server
} catch(StompException $e) {
die('Connection failed: ' . $e->getMessage());
}
结果
Connection failed: Server is not responding
以上代码适用于localhost 或Intranet,但不适用于外部IP,
使用 java 代码连接到同一服务器,但不能使用 php stomp
【问题讨论】:
-
您必须联系具有外部 IP 的服务器的管理员。
-
但是通过使用 java 代码我可以连接到同一台服务器