From a84537af0192c0dd3f3162d08b4888930a5d4f17 Mon Sep 17 00:00:00 2001 From: John Dempsey <1750243+mcfnord@users.noreply.github.com> Date: Tue, 11 Jul 2023 14:32:16 -0700 Subject: [PATCH] reverting --- tools/generate_json_rpc_docs.py | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/tools/generate_json_rpc_docs.py b/tools/generate_json_rpc_docs.py index 5212742d70..070ab134d3 100755 --- a/tools/generate_json_rpc_docs.py +++ b/tools/generate_json_rpc_docs.py @@ -181,7 +181,7 @@ def to_markdown(self): items.sort(key=lambda item: item.name) PREAMBLE = """ -# Jamulus JSON-RPC Interface Documentation +# Jamulus JSON-RPC Server Documentation -A JSON-RPC interface is available for both Jamulus client and server that allows programmatic access. -To add the JSON-RPC interface, run Jamulus with the `--jsonrpcport --jsonrpcsecretfile /file/with/a/secret.txt` options. -This will start a JSON-RPC interface server on the specified port on the localhost. +A JSON-RPC server can be added to both Jamulus client and Jamulus server to allow programmatic access. +To add the JSON-RPC server, run Jamulus with the `--jsonrpcport --jsonrpcsecretfile /file/with/a/secret.txt` options. +This will start a JSON-RPC server on the specified port on the localhost. The file referenced by `--jsonrpcsecretfile` must contain a single line with a freely chosen string with at least 16 characters. It can be generated like this: @@ -199,21 +199,21 @@ def to_markdown(self): $ openssl rand -base64 10 > /file/with/a/secret.txt ``` -The JSON-RPC interface defaults to listening on the local loopback network interface (127.0.0.1). +The JSON-RPC server defaults to listening on the local loopback network interface (127.0.0.1). This can be optionally changed by using the `--jsonrpcbindip ` command line option. ## Wire protocol -The JSON-RPC interface is based on the [JSON-RPC 2.0](https://www.jsonrpc.org/specification) protocol, using [streaming newline-delimited JSON over TCP](https://clue.engineering/2018/introducing-reactphp-ndjson) as the transport. There are three main types of messages being exchanged: +The JSON-RPC server is based on the [JSON-RPC 2.0](https://www.jsonrpc.org/specification) protocol, using [streaming newline-delimited JSON over TCP](https://clue.engineering/2018/introducing-reactphp-ndjson) as the transport. There are three main types of messages being exchanged: - A **request** from the consumer to Jamulus. - A **response** from Jamulus to the consumer. - A **notification** from Jamulus to the consumer. -## Connect to a JSON-RPC interface +## Connect to a JSON-RPC server -On Linux, you can connect to a JSON-RPC interface using the `nc` CLI tool. +On Linux, you can connect to a JSON-RPC server using the `nc` CLI tool. On Windows, [you can download](https://nmap.org/ncat/) and use the `ncat` CLI tool. @@ -230,7 +230,7 @@ def to_markdown(self): ## Example -After opening a TCP connection to the JSON-RPC interface server, the connection must be authenticated: +After opening a TCP connection to the JSON-RPC server, the connection must be authenticated: ```json {"id":1,"jsonrpc":"2.0","method":"jamulus/apiAuth","params":{"secret": "...the secret from the file in --jsonrpcsecretfile..."}}