Skip to content

Commit

Permalink
fixup! Update uds example to use tokio UnixListenerStream
Browse files Browse the repository at this point in the history
  • Loading branch information
agreen17 committed Dec 1, 2021
1 parent c63e1f9 commit 0f05ae3
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions examples/src/uds/server.rs
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,11 @@ impl Greeter for MyGreeter {
{
let conn_info = request.extensions().get::<UdsConnectInfo>().unwrap();
println!("Got a request {:?} with info {:?}", request, conn_info);

// Client-side unix sockets are unnamed.
assert!(conn_info.peer_addr.as_ref().unwrap().is_unnamed());
// This should contain process credentials for the client socket.
assert!(conn_info.peer_cred.as_ref().is_some());
}

let reply = hello_world::HelloReply {
Expand Down

0 comments on commit 0f05ae3

Please sign in to comment.