Start networking and exchanging professional insights

Register now or log in to join your professional community.

Follow

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

user-image
Question added by Feras Abualrub , Web Solutions Manager , Qistas for Information Technology
Date Posted: 2015/04/15
Paarhati Ozkasgarli
by 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
by 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

Do you need help in adding the right keywords to your CV? Let our CV writing experts help you.