尝试运行函数socket_recvfrom但它返回错误:socket_recvfrom():无法recvfrom [0]:操作成功完成
我正在运行一个函数: @socket_recvfrom($this->socket, $buf, 8192, 0, $from, $port);
但这会返回一个错误:
socket_recvfrom(): 无法recvfrom [0]: 操作成功完成。
有人对此有想法吗?这意味着什么?
操作系统:Windows
PHP:5.3
莫滕
I am running a function: @socket_recvfrom($this->socket, $buf, 8192, 0, $from, $port);
but this returns an error saying:
socket_recvfrom(): unable to recvfrom [0]: The operation completed successfully.
Anyone who has an idea about this? What does this mean?
OS: Windows
PHP: 5.3
Morten
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
这可能意味着套接字是非阻塞的,并且调用该函数时没有可用的缓冲数据,或者套接字收到了带外消息。或者首先没有正确创建套接字。
“无法接收”之后的 [0] 让我认为这可能是套接字的资源 ID - 如果成功创建了套接字,则该资源 ID 不会为 0。
C.
It might mean that the socket is non-blocking and there was no buffered data available when the function was called, or that the socket received an out-of-band message. Or that the socket has not been created correctly in the first place.
The [0] after the "unable to recvfrom" makes me think that this might be the resource id for the socket - which would not be 0 if te socket had been created succesfully.
C.