I try to understand differences between TCP and UDP packet on the error-checking. I know that UDP packets are connectionless and doesn't care that the packet will arrive the destination safely. And TCP packet is the opposite of UDP.
My question is, if a packet send into a closed port of a remote host, what action will take place on UDP and TCP packets?
UDP packet – response with an ICMP (Code-3)?
TCP packet – response with a RST packet?