Skip to content

Commit 224866d

Browse files
committed
Extend tests incoming connection
1 parent 8f209fc commit 224866d

File tree

1 file changed

+3
-0
lines changed
  • fortanix-vme/tests/incoming_connection/src

1 file changed

+3
-0
lines changed

fortanix-vme/tests/incoming_connection/src/main.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,9 @@ fn main() {
1313
Ok((mut stream, addr)) => {
1414
println!("# addr = {:?}", addr);
1515
assert_eq!(stream.peer_addr().unwrap().ip(), Ipv4Addr::new(127, 0, 0, 1));
16+
assert!(stream.peer_addr().unwrap().port() != 3400);
17+
assert_eq!(stream.local_addr().unwrap().ip(), Ipv4Addr::new(127, 0, 0, 1));
18+
assert_eq!(stream.local_addr().unwrap().port(), 3400);
1619
println!("Connection {}: Connected", id);
1720
let mut buff_in = [0u8; 4192];
1821
let n = stream.read(&mut buff_in).unwrap();

0 commit comments

Comments
 (0)