You've already forked qlg.tsgz.moe
Init Repo
This commit is contained in:
17
vendor/swoole/examples/ipv6/tcp_client.php
vendored
Executable file
17
vendor/swoole/examples/ipv6/tcp_client.php
vendored
Executable file
@ -0,0 +1,17 @@
|
||||
<?php
|
||||
$client = new swoole_client(SWOOLE_SOCK_TCP6);
|
||||
if (!$client->connect('::1', 9501, -1))
|
||||
{
|
||||
exit("connect failed. Error: {$client->errCode}\n");
|
||||
}
|
||||
|
||||
var_dump($client->getsockname());
|
||||
|
||||
for($i=0; $i < 1; $i ++)
|
||||
{
|
||||
$client->send("hello world\n");
|
||||
echo $client->recv();
|
||||
usleep(2000);
|
||||
}
|
||||
|
||||
$client->close();
|
Reference in New Issue
Block a user