January 2019
Intermediate to advanced
520 pages
14h 32m
English
Compile this example with the cargo build subcommand, and let's start three instances of the service using the following commands (run every command in a separate terminal window to see the logs):
RUST_LOG=JSON-RPC_ring=trace ADDRESS=127.0.0.1:4444 NEXT=127.0.0.1:5555 target/debug/JSON-RPC-ringRUST_LOG=JSON-RPC_ring=trace ADDRESS=127.0.0.1:5555 NEXT=127.0.0.1:6666 target/debug/JSON-RPC-ringRUST_LOG=JSON-RPC_ring=trace ADDRESS=127.0.0.1:6666 NEXT=127.0.0.1:4444 target/debug/JSON-RPC-ring
When the three services are started, prepare and send a JSON-RPC call request with curl from another terminal window:
curl -H "Content-Type: application/json" --data-binary '{"JSON-RPC":"2.0","id":"curl","method":"start_roll_call","params":[]}' ...Read now
Unlock full access