Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game. |
Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
|
05-17-2003, 01:27 PM
|
#1
|
Member
Registered: Feb 2002
Posts: 586
Rep:
|
TCP vs. UDP
What do you think is better ?
TCP or UDP ?
|
|
|
05-17-2003, 01:52 PM
|
#2
|
Member
Registered: Jan 2003
Location: Poland, Warsaw
Distribution: LFS, Gentoo
Posts: 591
Rep:
|
Depends on purpose.
|
|
|
05-17-2003, 02:31 PM
|
#3
|
LQ Newbie
Registered: May 2003
Distribution: Red Hat 9.0, Windows XP, Windows 98, Windows 2000 pro
Posts: 4
Rep:
|
purpose doesn't really matter all to much tcp is much better than udp as far as a protocol goes but UDP does have it's purposes where nothing else would do. As far as basic functionality TCP is better because it has error checking built in where as UDP is simple best effort delivery. On transferring a file with UDP you may get it all you may not. You are going to get it all with TCP whatever is on the host computer is what you get everytime.
|
|
|
05-17-2003, 03:41 PM
|
#4
|
LQ Guru
Registered: Apr 2002
Location: Atlanta
Distribution: Gentoo
Posts: 1,280
Rep:
|
what Rain said, TCP is what you want for reliable connections, examples include HTTP, FTP, TELNET, SSH. When a computer sends data, the reciever sends back an ACK (acknowledge) and if the there is no ACK recieved after a period of time, the sender re-sends the data. In UDP its just send it and hope it gets there. UDP is used in DHCP, DNS (i think), RIP and other protocols that dont require a reliable connection.
|
|
|
05-17-2003, 04:03 PM
|
#5
|
Senior Member
Registered: Apr 2003
Location: Eire
Distribution: Slackware 12.0, OpenSuse 10.3
Posts: 1,120
Rep:
|
And UDP is the default delivery mechanism for most streaming media
- less overhead involved and less likely to experience "stutter" when playing back as there's no hanging about waiting for acknowledgements
|
|
|
05-17-2003, 05:14 PM
|
#6
|
Moderator
Registered: Feb 2002
Location: Grenoble
Distribution: Debian
Posts: 9,696
|
There's no "better" or "worser". TCP is connection oriented, used when you'd like to send data and be sure it was received (mail, ftp, www and many other uses). UDP is connection-less, when you don't want/don't need to know if the data was received (and you don't need/want retransmissions). It may be used for video, VoIP etc.
When you send VoIP, a loss of one piece is not a problem - people will be able to understand each other. The same with video. That's why UDP is used there.
Oh...Forgot one thing. UDP is faster. You don't need to connect. So when I want just to send short data, I prefer UDP.
|
|
|
All times are GMT -5. The time now is 07:34 PM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|