You've already forked qlg.tsgz.moe
Init Repo
This commit is contained in:
19
vendor/swoole/examples/async/read.php
vendored
Executable file
19
vendor/swoole/examples/async/read.php
vendored
Executable file
@ -0,0 +1,19 @@
|
||||
<?php
|
||||
//ini_set("swoole.aio_mode", 1);
|
||||
swoole_async_read(
|
||||
__DIR__ . '/data.txt',
|
||||
function ($filename, $content)
|
||||
{
|
||||
echo "file: $filename\ncontent-length: " . strlen($content) . "\nContent: $content\n";
|
||||
if (empty($content))
|
||||
{
|
||||
echo "file is end.\n";
|
||||
return false;
|
||||
}
|
||||
else
|
||||
{
|
||||
return true;
|
||||
}
|
||||
},
|
||||
8192
|
||||
);
|
Reference in New Issue
Block a user