Crates.io | tetsy-jsonrpc-ipc-server |
lib.rs | tetsy-jsonrpc-ipc-server |
version | 15.1.0 |
source | src |
created_at | 2021-03-01 07:56:27.381393 |
updated_at | 2021-03-13 04:05:51.91391 |
description | Tetsy IPC server for JSON-RPC |
homepage | https://core.tetcoin.org |
repository | https://github.com/tetcoin/tetsy-jsonrpc |
max_upload_size | |
id | 362112 |
size | 49,332 |
IPC server (Windows & Linux) for JSON-RPC 2.0.
Cargo.toml
[dependencies]
tetsy-jsonrpc-ipc-server = "14.2"
main.rs
extern crate tetsy_jsonrpc_ipc_server;
use tetsy_jsonrpc_ipc_server::ServerBuilder;
use tetsy_jsonrpc_ipc_server::tetsy_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();
}