Untitled

FSM Composition


TCP Connection


Actions on edges: {event} / {action}

Actions on edges: {event} / {action}

Tearing down

  1. Active closer starts the operation

    If one of the sides of the connection calls close, it traverses along the right edge on the left to the FIN WAIT 1 exstate.

    This causes it to send a FIN packet to the other side of the connection.

  2. Passive closer

    The other side receives the FIN and takes the blue edge on the right to the CLOSE WAIT state.

    It remains in this state until the program on its side calls close, at which point it sends a FIN.

  3. Three possible outcomes from FIN WAIT 1

    1. First, the passive closer might acknowledge the FIN but not send a FIN. In this case, the passive closer is in the CLOSE WAIT state and can continue to send data, while the active closer enters the FIN WAIT 2 state
    2. Second, the passive closer might close its side too, acknowledging the FIN and send a FIN of its own. This is the middle edge, to the TIME WAIT state.
    3. Finally, it could be that both sides actively closed at almost the same time, and sent FINs to each other. In this case, both are in the FIN WAIT 1 state.

What is the purpose of TIME WAIT in TCP connection tear down?