mirror of
https://github.com/OMGeeky/tarpc.git
synced 2025-12-29 07:40:14 +01:00
@@ -69,9 +69,9 @@ impl SyncService for HelloServer {
|
||||
|
||||
fn main() {
|
||||
let addr = "localhost:10000";
|
||||
let _server = HelloServer.listen(addr);
|
||||
HelloServer.listen(addr).unwrap();
|
||||
let client = SyncClient::connect(addr).unwrap();
|
||||
println!("{}", client.hello(&"Mom".to_string()).unwrap());
|
||||
println!("{}", client.hello("Mom".to_string()).unwrap());
|
||||
}
|
||||
```
|
||||
|
||||
|
||||
@@ -28,7 +28,7 @@ impl SyncService for HelloServer {
|
||||
|
||||
fn main() {
|
||||
let addr = "localhost:10000";
|
||||
let _server = HelloServer.listen(addr);
|
||||
HelloServer.listen(addr).unwrap();
|
||||
let client = SyncClient::connect(addr).unwrap();
|
||||
println!("{}", client.hello("Mom".to_string()).unwrap());
|
||||
}
|
||||
|
||||
@@ -50,7 +50,7 @@ impl SyncService for HelloServer {
|
||||
|
||||
fn main() {
|
||||
let addr = "localhost:10000";
|
||||
let _server = HelloServer.listen(addr);
|
||||
HelloServer.listen(addr).unwrap();
|
||||
let client = SyncClient::connect(addr).unwrap();
|
||||
println!("{}", client.hello("Mom".to_string()).unwrap());
|
||||
println!("{}", client.hello("".to_string()).unwrap_err());
|
||||
|
||||
Reference in New Issue
Block a user