fn connection_setup_closed_listen(
    server: &mut Engine<TestRuntime>,
    listen_addr: ipv4::Endpoint,
) -> AcceptFuture<TestRuntime> {
    // Issue ACCEPT operation.
    let socket_fd: u32 = server.tcp_socket();
    server.tcp_bind(socket_fd, listen_addr).unwrap();
    server.tcp_listen(socket_fd, 1).unwrap();
    let accept_future: AcceptFuture<TestRuntime> = server.tcp_accept(socket_fd);

    // LISTEN state.
    server.rt().poll_scheduler();

    accept_future
}
/// Triggers CLOSED -> LISTEN state transition.
Triggers CLOSED -> LISTEN state transition.
Triggers CLOSED - > LISTEN state transition .
fn connection_setup_closed_listen(
    server: &mut Engine<TestRuntime>,
    listen_addr: ipv4::Endpoint,
) -> AcceptFuture<TestRuntime> {
    // Issue ACCEPT operation.
    let socket_fd: u32 = server.tcp_socket();
    server.tcp_bind(socket_fd, listen_addr).unwrap();
    server.tcp_listen(socket_fd, 1).unwrap();
    let accept_future: AcceptFuture<TestRuntime> = server.tcp_accept(socket_fd);
    // LISTEN state.
    server.rt().poll_scheduler();
    accept_future
}
fn connection_setup_closed_listen ( server : & mut Engine < TestRuntime > , listen_addr : ipv4 :: Endpoint , ) -> AcceptFuture < TestRuntime > { // Issue ACCEPT operation. let socket_fd : u32 = server . tcp_socket ( ) ; server . tcp_bind ( socket_fd , listen_addr ) . unwrap ( ) ; server . tcp_listen ( socket_fd , 1 ) . unwrap ( ) ; let accept_future : AcceptFuture < TestRuntime > = server . tcp_accept ( socket_fd ) ; // LISTEN state. server . rt ( ) . poll_scheduler ( ) ; accept_future }
Triggers CLOSED -> LISTEN state transition.
Triggers CLOSED - > LISTEN state transition .
server
&mut Engine<TestRuntime>
listen_addr
ipv4::Endpoint
server
&mut Engine<TestRuntime>
listen_addr
ipv4::Endpoint