Lines Matching refs:bind_addr
9 let bind_addr = IpSocketAddress::new(ip, 0); in test_tcp_bind_ephemeral_port() localVariable
12 sock.blocking_bind(net, bind_addr).unwrap(); in test_tcp_bind_ephemeral_port()
16 assert_eq!(bind_addr.ip(), bound_addr.ip()); in test_tcp_bind_ephemeral_port()
17 assert_ne!(bind_addr.port(), bound_addr.port()); in test_tcp_bind_ephemeral_port()
24 let bind_addr = in test_tcp_bind_specific_port() localVariable
25 attempt_random_port(ip, |bind_addr| sock.blocking_bind(net, bind_addr)).unwrap(); in test_tcp_bind_specific_port()
29 assert_eq!(bind_addr.ip(), bound_addr.ip()); in test_tcp_bind_specific_port()
30 assert_eq!(bind_addr.port(), bound_addr.port()); in test_tcp_bind_specific_port()
35 let bind_addr = IpSocketAddress::new(ip, 0); in test_tcp_bind_addrinuse() localVariable
38 sock1.blocking_bind(net, bind_addr).unwrap(); in test_tcp_bind_addrinuse()
54 let bind_addr = { in test_tcp_bind_reuseaddr() localVariable
57 let bind_addr = in test_tcp_bind_reuseaddr() localVariable
58 attempt_random_port(ip, |bind_addr| listener1.blocking_bind(net, bind_addr)).unwrap(); in test_tcp_bind_reuseaddr()
63 IpSocketAddress::new(IpAddress::new_loopback(ip.family()), bind_addr.port()); in test_tcp_bind_reuseaddr()
74 bind_addr in test_tcp_bind_reuseaddr()
82 listener2.blocking_bind(net, bind_addr).unwrap(); in test_tcp_bind_reuseaddr()
91 let bind_addr = IpSocketAddress::new(ip, 0); in test_tcp_bind_addrnotavail() localVariable
96 sock.blocking_bind(net, bind_addr), in test_tcp_bind_addrnotavail()