From 0d179b042f931f385b8d2fa2c1817b597ba2ebe7 Mon Sep 17 00:00:00 2001 From: hozan23 Date: Wed, 22 May 2024 15:06:53 +0200 Subject: jsonrpc: main example clean up --- jsonrpc/README.md | 4 ++-- jsonrpc/src/lib.rs | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) (limited to 'jsonrpc') diff --git a/jsonrpc/README.md b/jsonrpc/README.md index 3322671..091af99 100644 --- a/jsonrpc/README.md +++ b/jsonrpc/README.md @@ -101,7 +101,7 @@ async { .expect("send a request"); let (sub_id, sub) = client - .subscribe("Calc.log_subscribe", ()) + .subscribe("HelloWorld.log_subscribe", ()) .await .expect("Subscribe to log_subscribe method"); @@ -116,7 +116,7 @@ async { smol::Timer::after(std::time::Duration::from_secs(5)).await; client - .unsubscribe("Calc.log_unsubscribe", sub_id) + .unsubscribe("HelloWorld.log_unsubscribe", sub_id) .await .expect("Unsubscribe from log_unsubscirbe method"); }; diff --git a/jsonrpc/src/lib.rs b/jsonrpc/src/lib.rs index 7573c4d..626d159 100644 --- a/jsonrpc/src/lib.rs +++ b/jsonrpc/src/lib.rs @@ -6,13 +6,13 @@ mod error; pub mod message; mod server; -pub use client::Client; +pub use client::{Client, ClientBuilder}; pub use error::{Error, Result}; pub use server::{ channel::{ArcChannel, Channel, Subscription, SubscriptionID}, pubsub_service::{PubSubRPCMethod, PubSubRPCService}, service::{RPCMethod, RPCService}, - Server, + Server, ServerBuilder }; pub use karyon_jsonrpc_macro::{rpc_impl, rpc_pubsub_impl}; -- cgit v1.2.3