You've already forked qlg.tsgz.moe
Init Repo
This commit is contained in:
12
vendor/swoole/examples/unixsock/dgram_client.php
vendored
Executable file
12
vendor/swoole/examples/unixsock/dgram_client.php
vendored
Executable file
@ -0,0 +1,12 @@
|
||||
<?php
|
||||
$client = new swoole_client(SWOOLE_SOCK_UNIX_DGRAM, SWOOLE_SOCK_SYNC);
|
||||
if (!$client->connect(__DIR__ . '/svr.sock', 0, -1))
|
||||
{
|
||||
exit("connect failed. Error: {$client->errCode}\n");
|
||||
}
|
||||
|
||||
$client->send("hello world\n");
|
||||
echo $client->recv();
|
||||
$client->close();
|
||||
|
||||
sleep(1);
|
Reference in New Issue
Block a user