We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
$app = function (Ratchet\Client\WebSocket $conn) use ($connector, $loop, &$app, $server_id) { $conn->on('message', function (\Ratchet\RFC6455\Messaging\MessageInterface $msg) use ($conn) { global $server_id; $msg = json_decode($msg); $proc = popen("ping -t 127.0.0.1",'r'); if($msg->type=='run') { while (!feof($proc)) { echo $read = fread($proc, 4096); if($read) { $conn->send($read); } } } });
Looks like while (!feof($proc)) blocks main thread... Is there any other way to send live output to websocket server?
while (!feof($proc))
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Looks like
while (!feof($proc))
blocks main thread...Is there any other way to send live output to websocket server?
The text was updated successfully, but these errors were encountered: