Skip to content

The tcp json server example not worked! #678

Description

@duanwujie
use jsonrpc_tcp_server::ServerBuilder;
use jsonrpc_core::*;
fn tcp_server() {

    let mut io = IoHandler::default();
    io.add_sync_method("say_hello", |_params| {
        Ok(Value::String("hello".to_string()))
    });
    let server = ServerBuilder::new(io)
        .start(&"0.0.0.0:3030".parse().unwrap())
        .expect("Server must start with no issues.");

    server.wait();
}

The server.wait() didn't blocked , json_tcp_server version is 18.0.0

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions