ابدأ بالتواصل مع الأشخاص وتبادل معارفك المهنية

أنشئ حسابًا أو سجّل الدخول للانضمام إلى مجتمعك المهني.

متابعة

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

user-image
تم إضافة السؤال من قبل Feras Abualrub , Web Solutions Manager , Qistas for Information Technology
تاريخ النشر: 2015/04/15
Paarhati Ozkasgarli
من قبل 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
من قبل 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.  

المزيد من الأسئلة المماثلة

هل تحتاج لمساعدة في كتابة سيرة ذاتية تحتوي على الكلمات الدلالية التي يبحث عنها أصحاب العمل؟