Lines Matching refs:bind
18 sock.bind(bind_addr).unwrap(); in test_tcp_bind_ephemeral_port()
30 let bind_addr = attempt_random_port(ip, |bind_addr| sock.bind(bind_addr)).unwrap(); in test_tcp_bind_specific_port()
43 sock1.bind(bind_addr).unwrap(); in test_tcp_bind_addrinuse()
50 sock2.bind(bound_addr), in test_tcp_bind_addrinuse()
63 .bind(IpSocketAddress::new( in test_tcp_bind_reuseaddr()
107 listener2.bind(bind_addr).unwrap(); in test_tcp_bind_reuseaddr()
118 sock.bind(bind_addr), in test_tcp_bind_addrnotavail()
131 let result = sock.bind(IpSocketAddress::new(wrong_ip, 0)); in test_tcp_bind_wrong_family()
146 sock_v4.bind(ipv4_broadcast), in test_tcp_bind_non_unicast()
150 sock_v4.bind(ipv4_multicast), in test_tcp_bind_non_unicast()
154 sock_v6.bind(ipv6_multicast), in test_tcp_bind_non_unicast()
164 assert!(matches!(sock.bind(addr), Err(ErrorCode::InvalidArgument))); in test_tcp_bind_dual_stack()