When a socket is closed at one side of the communication, the other side will not get to know this information.
In
your case, when ctrl+c is performed, socket is terminated abruptly at
host1 end. Until, host2 tries to read from this broken connection, host 2
will not know that the connection is broken and it will keep the same
conn alive. The moment, host2 tries to read from this socket, it will
come to know that the connection is broken and it will terminate the
connection. The logical flow of function(system calls) at host2 would be