Crates.io | jsonrpc-ipc-server |
lib.rs | jsonrpc-ipc-server |
version | 18.0.0 |
source | src |
created_at | 2017-02-16 13:49:08.390821 |
updated_at | 2021-07-20 15:55:46.878171 |
description | IPC server for JSON-RPC |
homepage | https://github.com/paritytech/jsonrpc |
repository | https://github.com/paritytech/jsonrpc |
max_upload_size | |
id | 8540 |
size | 42,840 |
IPC server (Windows & Linux) for JSON-RPC 2.0.
Cargo.toml
[dependencies]
jsonrpc-ipc-server = "15.0"
main.rs
extern crate jsonrpc_ipc_server;
use jsonrpc_ipc_server::ServerBuilder;
use jsonrpc_ipc_server::jsonrpc_core::*;
fn main() {
let mut io = IoHandler::new();
io.add_method("say_hello", |_params| {
Ok(Value::String("hello".into()))
});
let builder = ServerBuilder::new(io);
let server = builder.start("/tmp/json-ipc-test.ipc").expect("Couldn't open socket");
server.wait();
}