Registry / networking / jsonrpc-tcp-server

jsonrpc-tcp-server

JSON →
library18.0.0rscratesunverified

TCP/IP server for JSON-RPC.

# Cargo.toml [dependencies] jsonrpc-tcp-server = "18.0.0"
INSTALL
IMPORT
SIG · JSONRPC-TCP-SERVER
J
jsonrpc-tcp-server
networkingrustv18.0.0
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

Server
use jsonrpc_tcp_server::Server;

Start a JSON-RPC TCP server.

use jsonrpc_tcp_server::Server; use jsonrpc_core::IoHandler; fn main() { let mut io = IoHandler::new(); io.add_method("say_hello", |_| { Ok(json!("hello")) }); let server = Server::new("127.0.0.1:3030".parse().unwrap(), io).unwrap(); server.run().unwrap(); }
Debug
Known issues
gotchaRequires tokio runtime for async operations.
fix
Add tokio as a dependency and use #[tokio::main] or similar.
affects: >=18.0.0
Upgrade
Version history
18.0.0latest on crates.io
Audit
Dependencies

No dependency data recorded yet.

Agent activity
4 hits · last 30 days
node
4
Resources
jsonrpc-tcp-server — cargo add jsonrpc-tcp-server · libregistry