Expand description
jsonrpc server over tcp/ip
use tetsy_jsonrpc_core::*;
use tetsy_jsonrpc_tcp_server::ServerBuilder;
fn main() {
let mut io = IoHandler::default();
io.add_method("say_hello", |_params| {
Ok(Value::String("hello".to_string()))
});
let server = ServerBuilder::new(io)
.start(&"0.0.0.0:0".parse().unwrap())
.expect("Server must start with no issues.");
server.wait();
}
Re-exports§
pub use tetsy_jsonrpc_core;
pub use self::server_utils::tokio;
Structs§
- Peer-messages dispatcher.
- Request context
- TCP Server handle
- TCP server builder
Enums§
- Push Message Error
- Separator for enveloping messages in streaming codecs
Traits§
- Metadata extractor (per session)