PHP_SocketIO_Client icon indicating copy to clipboard operation
PHP_SocketIO_Client copied to clipboard

fread blocking

Open changsongl opened this issue 6 years ago • 0 comments

fread will just hang there forever until killed. fread is working in my local Windows environment. However, I have to remove freads to avoid blocking in my Unix product server. Anyone please tell me why it works in different ways? Also, what is the draw back to remove freads? It is so weird how it works. If I remove fread in my local environment, the socket server won't be able to get data that I sent. I am totally confused. Please help me. Thanks.

$handshaked = ($keyAccept === $expectedResonse) ? true : false; if ($handshaked){ fwrite($fd, $this->hybi10Encode('42["' . $action . '", "' . addslashes($data) . '"]')); fread($fd,1000000); return true; } else {return false;}

changsongl avatar Apr 03 '19 13:04 changsongl