Figure shows the four exchanges required to close a connection. The first step shown is when client A is ready to close the connection therefore it sends a segment with the FIN flag set and it is received by client B. Step two has client B sending an ACK to client A. Step three is also from client B and it sends a FIN to client A to terminate the server to client session and the client receives the FIN. The final step is when client A responds to client B by sending an ACK to client B.