Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fread blocking #16

Open
changsongl opened this issue Apr 3, 2019 · 0 comments
Open

fread blocking #16

changsongl opened this issue Apr 3, 2019 · 0 comments

Comments

@changsongl
Copy link

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;}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant