Init Repo

This commit is contained in:
root
2019-09-06 23:53:10 +08:00
commit f0ef89dfbb
7905 changed files with 914138 additions and 0 deletions

17
vendor/swoole/examples/async/dns_lookup.php vendored Executable file
View File

@ -0,0 +1,17 @@
<?php
swoole_async_set(array(
//使用纯异步IO
'use_async_resolver' => true,
'disable_dns_cache' => true,
'dns_lookup_random' => true,
'dns_server' => '114.114.114.114',
));
swoole_async_dns_lookup("www.sina.com.cn", function ($host, $ip)
{
echo "{$host} reslove to {$ip}\n";
});
swoole_async_dns_lookup("www.baidu.com", function ($host, $ip)
{
echo "{$host} reslove to {$ip}\n";
});