-1

I am new to networking and was studying about TCP and UDP. One question came to my mind that what will happen if a sender uses TCP and receiver uses UDP for the communication.

3
  • they won't be able to communicate. Simular situation in real life: what happens when one person speaks spanish and another person speaks chinese (and there is no translator somewhere).
    – Effie
    Dec 13, 2021 at 8:08
  • Thank you for the answer, I got your point. Dec 13, 2021 at 11:22
  • When communication is initiated from source with destination port and protocol. Same port should listen on destination server on same protocol other wise destination server will reset connection and session is closed forcefully. Jan 29 at 17:49

2 Answers 2

2

Exactly nothing happens. When host A sends a TCP SYN (initiate connect) to host B where the indicated TCP port isn't open/listening, the connection attempt fails. The destination host might actively reject the connection due to the TCP port being closed but it might just as well just drop the TCP SYN attempt (or it might get dropped by a firewall).

TCP and UDP are completely distinct protocols. They have no relation with each other.

Both use the same range of ports for subaddressing - 0 through 65535, but UDP port x and TCP port x are not related to each other (although they might be used by the same service/application).

1
  • Thanks for your Answer, I got it.... Dec 13, 2021 at 11:25
0

When communication is initiated from source with destination port and protocol. Same port should listen on destination server on same protocol other wise destination server will reset connection and session is closed forcefully

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.