Skip to content

Commit

Permalink
extend example to an echo server
Browse files Browse the repository at this point in the history
These changes test the `sendto` support of the kernel.
  • Loading branch information
stlankes committed Dec 16, 2023
1 parent 0c7b6b9 commit 10f5ae4
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions examples/testudp/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,11 @@ fn main() {
}
}

// send message back
socket
.send_to(msg.as_bytes(), addr)
.expect("Unable to send message back");

if msg.starts_with("exit") {
break;
}
Expand Down

0 comments on commit 10f5ae4

Please sign in to comment.