A RST response is generated by the server when a client attempts to connect to a TCP port that is not open. The RST message informs the client that the port is not available, and the client should reset its connection. The RST response is generated by the server to immediately terminate the connection attempt and prevent the client from wasting resources attempting to connect to a port that will not respond.