jsonrpc-ipc-server

Crates.iojsonrpc-ipc-server
lib.rsjsonrpc-ipc-server
version18.0.0
sourcesrc
created_at2017-02-16 13:49:08.390821
updated_at2021-07-20 15:55:46.878171
descriptionIPC server for JSON-RPC
homepagehttps://github.com/paritytech/jsonrpc
repositoryhttps://github.com/paritytech/jsonrpc
max_upload_size
id8540
size42,840
Core devs (github:paritytech:core-devs)

documentation

https://docs.rs/jsonrpc-ipc-server/

README

jsonrpc-ipc-server

IPC server (Windows & Linux) for JSON-RPC 2.0.

Documentation

Example

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();
}
Commit count: 771

cargo fmt