Lines Matching refs:bind
146 pub fn bind<T: Into<IpListenEndpoint>>(&mut self, endpoint: T) -> Result<(), BindError> { in bind() method
580 assert_eq!(socket.bind(0), Err(BindError::Unaddressable)); in test_bind_unaddressable()
586 assert_eq!(socket.bind(1), Ok(())); in test_bind_twice()
587 assert_eq!(socket.bind(2), Err(BindError::InvalidState)); in test_bind_twice()
605 assert_eq!(socket.bind(LOCAL_PORT), Ok(())); in test_send_unaddressable()
634 assert_eq!(socket.bind(LOCAL_END), Ok(())); in test_send_dispatch()
677 assert_eq!(socket.bind(LOCAL_PORT), Ok(())); in test_recv_process()
698 assert_eq!(socket.bind(LOCAL_PORT), Ok(())); in test_peek_process()
713 assert_eq!(socket.bind(LOCAL_PORT), Ok(())); in test_recv_truncated_slice()
728 assert_eq!(socket.bind(LOCAL_PORT), Ok(())); in test_peek_truncated_slice()
745 assert_eq!(s.bind(LOCAL_END), Ok(())); in test_set_hop_limit()
772 assert_eq!(socket.bind(LOCAL_PORT), Ok(())); in test_doesnt_accept_wrong_port()
785 assert_eq!(port_bound_socket.bind(LOCAL_PORT), Ok(())); in test_doesnt_accept_wrong_ip()
789 assert_eq!(ip_bound_socket.bind(LOCAL_END), Ok(())); in test_doesnt_accept_wrong_ip()
797 assert_eq!(socket.bind(LOCAL_END), Ok(())); in test_send_large_packet()
813 assert_eq!(socket.bind(LOCAL_PORT), Ok(())); in test_process_empty_payload()
827 assert_eq!(socket.bind(LOCAL_PORT), Ok(())); in test_closing()