|
@ -4,8 +4,8 @@ Protocol Basics |
|
|
Message Stream |
|
|
Message Stream |
|
|
-------------- |
|
|
-------------- |
|
|
|
|
|
|
|
|
Clients and servers communicate using **JSON RPC** over an unspecified |
|
|
Clients and servers communicate using **JSON RPC** over an unspecified underlying stream |
|
|
underlying stream transport protocol, typically TCP or SSL. |
|
|
transport. Examples include TCP, SSL, WS and WSS. |
|
|
|
|
|
|
|
|
Two standards `JSON RPC 1.0 |
|
|
Two standards `JSON RPC 1.0 |
|
|
<http://www.jsonrpc.org/specification_v1>`_ and `JSON RPC 2.0 |
|
|
<http://www.jsonrpc.org/specification_v1>`_ and `JSON RPC 2.0 |
|
@ -25,11 +25,12 @@ Clients making batch requests should limit their size depending on the |
|
|
nature of their query, because servers will limit response size as an |
|
|
nature of their query, because servers will limit response size as an |
|
|
anti-DoS mechanism. |
|
|
anti-DoS mechanism. |
|
|
|
|
|
|
|
|
Each RPC call, and each response, is separated by a single newline in |
|
|
Over TCP and SSL raw sockets each RPC call, and each response, MUST be terminated by a |
|
|
their respective streams. The JSON specification does not permit |
|
|
single newline to delimit messages. Websocket messages are already framed so they MUST |
|
|
control characters within strings, so no confusion is possible there. |
|
|
NOT be newline terminated. The JSON specification does not permit control characters |
|
|
However it does permit newlines as extraneous whitespace between |
|
|
within strings, so no confusion is possible there. However it does permit newlines as |
|
|
elements; client and server MUST NOT use newlines in such a way. |
|
|
extraneous whitespace between elements; client and server MUST NOT use newlines in such a |
|
|
|
|
|
way. |
|
|
|
|
|
|
|
|
If using JSON RPC 2.0's feature of parameter passing by name, the |
|
|
If using JSON RPC 2.0's feature of parameter passing by name, the |
|
|
names shown in the description of the method or notification in |
|
|
names shown in the description of the method or notification in |
|
|