Skip to content

Commit

Permalink
test tarpc debug improvements
Browse files Browse the repository at this point in the history
  • Loading branch information
kylerchin committed Apr 24, 2024
1 parent 1ea1800 commit 2ff0dfb
Showing 1 changed file with 13 additions and 2 deletions.
15 changes: 13 additions & 2 deletions src/test_tarpc/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,11 @@ async fn main() {
8080,
);

let mut transport = tarpc::serde_transport::tcp::connect(socket_addr, Bincode::default)
println!("Will connect to {:?}", socket_addr);

let transport = tarpc::serde_transport::tcp::connect(socket_addr, Bincode::default)
.await
.unwrap();
.expect("Failed to connect to Aspen");

let aspen_client =
catenary::aspen::lib::AspenRpcClient::new(tarpc::client::Config::default(), transport)
Expand All @@ -27,4 +29,13 @@ async fn main() {
let tarpc_send_to_aspen = aspen_client
.hello(tarpc::context::current(), "Kyler".to_string())
.await;

match tarpc_send_to_aspen {
Ok(response) => {
println!("Response from Aspen: {}", response);
}
Err(e) => {
println!("Error from Aspen: {}", e);
}
}
}

0 comments on commit 2ff0dfb

Please sign in to comment.