Skip to content

Commit d9db818

Browse files
authored
Update ping method docs (#124)
1 parent 320a296 commit d9db818

File tree

5 files changed

+17
-5
lines changed

5 files changed

+17
-5
lines changed

.github/workflows/phpstan.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ jobs:
1919
runs-on: ubuntu-latest
2020
strategy:
2121
matrix:
22-
php-version: [ '8.1', '8.2', '8.3', '8.4', '8.5' ]
22+
php-version: [ '8.1', '8.2', '8.3', '8.4' ]
2323
max-parallel: 5
2424
fail-fast: false
2525
steps:

docs/en/client.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -186,9 +186,13 @@ Simps\MQTT\Client->recv(): bool|arary|string
186186
Send a heartbeat
187187

188188
```php
189-
Simps\MQTT\Client->ping()
189+
Simps\MQTT\Client->ping(bool $response = true)
190190
```
191191

192+
- `bool $response`
193+
194+
Whether a response is required. If `true`, `recv()` is called once
195+
192196
## buildMessageId()
193197

194198
Generate MessageId

docs/en/websocket.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -186,9 +186,13 @@ Simps\MQTT\WebSocketClient->recv(): bool|arary|string
186186
Send a heartbeat
187187

188188
```php
189-
Simps\MQTT\WebSocketClient->ping()
189+
Simps\MQTT\WebSocketClient->ping(bool $response = true)
190190
```
191191

192+
- `bool $response`
193+
194+
Whether a response is required. If `true`, `recv()` is called once
195+
192196
## buildMessageId()
193197

194198
Generate MessageId

docs/zh-cn/client.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -205,9 +205,11 @@ Simps\MQTT\Client->recv(): bool|arary|string
205205
发送心跳包
206206

207207
```php
208-
Simps\MQTT\Client->ping()
208+
Simps\MQTT\Client->ping(bool $response = true)
209209
```
210210

211+
- 参数`$response` 是否需要回执。如果为`true`,会调用一次`recv()`
212+
211213
## buildMessageId()
212214

213215
生成 MessageId

docs/zh-cn/websocket.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -205,9 +205,11 @@ Simps\MQTT\WebSocketClient->recv(): bool|arary|string
205205
发送心跳包
206206

207207
```php
208-
Simps\MQTT\WebSocketClient->ping()
208+
Simps\MQTT\WebSocketClient->ping(bool $response = true)
209209
```
210210

211+
- 参数`$response` 是否需要回执。如果为`true`,会调用一次`recv()`
212+
211213
## buildMessageId()
212214

213215
生成 MessageId

0 commit comments

Comments
 (0)