Unite most of tarpc into a single crate

This commit is contained in:
Artem Vorotnikov
2019-11-26 18:59:30 +03:00
committed by Tim
parent 6eb806907a
commit 5e19b79aa4
34 changed files with 72 additions and 166 deletions

View File

@@ -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.

View File

@@ -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()))