开发者

Trying to run the function socket_recvfrom but it returns an error: socket_recvfrom(): unable to recvfrom [0]: The operation completed successfully

开发者 https://www.devze.com 2022-12-21 08:21 出处:网络
I am running a function: @socket_recvfrom($this->socket, $buf, 8192, 0, $from, $port); but this returns an error saying:

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


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.

0

精彩评论

暂无评论...
验证码 换一张
取 消