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

18
vendor/swoole/examples/client/long_tcp.php vendored Executable file
View File

@@ -0,0 +1,18 @@
<?php
for($i=0; $i < 100; $i++)
{
$client = new swoole_client(SWOOLE_TCP | SWOOLE_KEEP);
if(!$client->connect('127.0.0.1', 9501))
{
exit("connect failed\n");
}
$client->send(str_repeat("A", 600));
$data = $client->recv(7000, 0);
if($data === false)
{
echo "recv fail\n";
break;
}
var_dump($data);
$client->close();
}