Communiquez avec les autres et partagez vos connaissances professionnelles

Inscrivez-vous ou connectez-vous pour rejoindre votre communauté professionnelle.

Suivre

When to use TCP Socket or UDP socket in programming and servers communications?

user-image
Question ajoutée par Feras Abualrub , Web Solutions Manager , Qistas for Information Technology
Date de publication: 2015/04/15
Paarhati Ozkasgarli
par Paarhati Ozkasgarli , Consultant , Al Emadi Enterprises

It is depends on what kind of data you want to transfer using UDP or TCP Socket.

UDP is a open protocol. Every information or data go through UDP does not wrapped and does not encrypted. That is why UDP is used for publicly available data. For example DNS, un-encrypted video or sound streaming for performance.

On the other hand TCP uses special wrapper to wrap all the data goes through TCP socket. You should use TCP socket if you need to transfer sensible information.

If you do not need UDP for some special reason, go with TCP. Because you will have more option in TCP Socket.

Muhammad Ahsan Javed
par Muhammad Ahsan Javed , System and Network Administrator , Lahore School of Economics

UDP is a low-overhead transmission and connectionless protocol.  TCP is a high-reliability data transmission and connection oriented protocol. So TCP used for more sensitive data because it encrypts the data. UDP does not encrypt the data and it is connectionless protocol it is used for audio, video transmission for better performance of videos.  

More Questions Like This

Avez-vous besoin d'aide pour créer un CV ayant les mots-clés recherchés par les employeurs?