Skip to content

Commit 08d4030

Browse files
committed
Update README.md
1 parent 199de1c commit 08d4030

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

README.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,3 +76,19 @@ $client2 = Client::getInstance('127.0.0.1', 9504);
7676
```
7777

7878
所以如果存在多个 RpcServer 时,需要使用继承,创建对应的单例。
79+
80+
```php
81+
<?php
82+
use Simps\RpcMultiplex\Client;
83+
use Simps\Singleton;
84+
85+
class RpcClient extends Client
86+
{
87+
use Singleton;
88+
89+
public function __construct()
90+
{
91+
parent::__construct('127.0.0.1', 9504);
92+
}
93+
}
94+
```

0 commit comments

Comments
 (0)