Skip to content

fread blocking  #16

@changsongl

Description

@changsongl

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions