@@ -27,8 +27,17 @@ A ping request is a standard JSON-RPC request with no parameters:
27
27
28
28
## Behavior Requirements
29
29
30
- 1 . The receiver MUST respond promptly to ping requests
31
- 2 . If no response is received within a reasonable timeout period, the sender MAY:
30
+ 1 . The receiver ** MUST** respond promptly with an empty response:
31
+
32
+ ``` json
33
+ {
34
+ "jsonrpc" : " 2.0" ,
35
+ "id" : " 123" ,
36
+ "result" : {}
37
+ }
38
+ ```
39
+
40
+ 2 . If no response is received within a reasonable timeout period, the sender ** MAY** :
32
41
- Consider the connection stale
33
42
- Terminate the connection
34
43
- Attempt reconnection procedures
@@ -41,19 +50,18 @@ sequenceDiagram
41
50
participant Receiver
42
51
43
52
Sender->>Receiver: ping request
44
- Note over Receiver: Process immediately
45
- Receiver->>Sender: response
53
+ Receiver->>Sender: empty response
46
54
```
47
55
48
56
## Implementation Considerations
49
57
50
- - Implementations SHOULD use pings to detect connection health
51
- - The frequency of pings SHOULD be configurable
52
- - Timeouts SHOULD be appropriate for the network environment
53
- - Excessive pinging SHOULD be avoided to reduce network overhead
58
+ - Implementations ** SHOULD** periodically issue pings to detect connection health
59
+ - The frequency of pings ** SHOULD** be configurable
60
+ - Timeouts ** SHOULD** be appropriate for the network environment
61
+ - Excessive pinging ** SHOULD** be avoided to reduce network overhead
54
62
55
63
## Error Handling
56
64
57
- - Timeouts SHOULD be treated as connection failures
58
- - Multiple failed pings MAY trigger connection reset
59
- - Implementation SHOULD log ping failures for diagnostics
65
+ - Timeouts ** SHOULD** be treated as connection failures
66
+ - Multiple failed pings ** MAY** trigger connection reset
67
+ - Implementations ** SHOULD** log ping failures for diagnostics
0 commit comments