mirror of
https://github.com/OMGeeky/tarpc.git
synced 2026-01-24 19:50:21 +01:00
Unite most of tarpc into a single crate
This commit is contained in:
@@ -40,7 +40,7 @@ async fn main() -> io::Result<()> {
|
||||
|
||||
let name = flags.value_of("name").unwrap().into();
|
||||
|
||||
let transport = tarpc_json_transport::connect(server_addr).await?;
|
||||
let transport = tarpc::json_transport::connect(server_addr).await?;
|
||||
|
||||
// WorldClient is generated by the service attribute. It has a constructor `new` that takes a
|
||||
// config and any Transport as input.
|
||||
|
||||
@@ -64,9 +64,9 @@ async fn main() -> io::Result<()> {
|
||||
|
||||
let server_addr = (IpAddr::from([0, 0, 0, 0]), port);
|
||||
|
||||
// tarpc_json_transport is provided by the associated crate tarpc-json-transport. It makes it easy
|
||||
// JSON transport is provided by the json_transport tarpc module. It makes it easy
|
||||
// to start up a serde-powered json serialization strategy over TCP.
|
||||
tarpc_json_transport::listen(&server_addr)
|
||||
tarpc::json_transport::listen(&server_addr)
|
||||
.await?
|
||||
// Ignore accept errors.
|
||||
.filter_map(|r| future::ready(r.ok()))
|
||||
|
||||
Reference in New Issue
Block a user