我看 GitHub 上所有测试用例都是成功的,但是我本地运行有一个用例失败了。
出错代码是这里:
$socketServer = stream_socket_server("udp://[::1]:12345", $errno, $errstr, STREAM_SERVER_BIND);
$errstr 输出内容:
Warning: stream_socket_server(): Unable to connect to udp://[::1]:12345 (Cannot assign requested address) in Standard input code on line 2
Cannot assign requested address
应该是你的服务器不支持ipv6
docker 容器启用 IPv6 https://docs.docker.com/config/daemon/ipv6/#use-ipv6-for-the-default-bridge-network