windows2008下 \stream_socket_get_name($this->_socket, true) 返回值为 false,

sulao4

系统部署在windows2008 下,使用AsyncTcpConnection连接外网地址,始终提醒
AsyncTcpConnection Error code:1 msg:connect ip:port fail after 21.0022
查看AsyncTcpConnection文件,发现\stream_socket_get_name($this->_socket, true)返回false
在本地电脑没问题,服务器上出错

1734 2 0
2个回答

six

地址无法连接,超时了。看下ip是否存在并且可连通,另外看下端口是否安全组和防火墙有放行

  • sulao4 2020-03-18

    $this->_socket 是有值的,resource(111) of type (stream),防火墙也关了,stream_socket_get_name($this->_socket, true)还是返回false,和dns有关系吗?

  • six 2020-03-18

    如果是用域名连的,有可能有关系。ip连的话和dns没关系

dignfei

改成 Linux

  • 暂无评论
年代过于久远,无法发表回答
🔝