Jump to content


 


Register a free account to unlock additional features at BleepingComputer.com
Welcome to BleepingComputer, a free community where people like yourself come together to discuss and learn how to use their computers. Using the site is easy and fun. As a guest, you can browse and view the various discussions in the forums, but can not create a new topic or reply to an existing one unless you are logged in. Other benefits of registering an account are subscribing to topics and forums, creating a blog, and having no ads shown anywhere on the site.


Click here to Register a free account now! or read our Welcome Guide to learn how to use this site.

Photo

Why sending packets with TCP, and not UDP?


  • Please log in to reply
5 replies to this topic

#1 Marcus

Marcus

  • Members
  • 3 posts
  • OFFLINE
  •  
  • Local time:05:32 AM

Posted 12 July 2004 - 08:34 AM

(Org. Email)


My name is Marcus Ogren, and I read you tutorial about TCP and UDP protcols from my home in Stockholm, Sweden.

I recently ran this application called TPTest. The program runs series of tests, first up/down traffic with TCP, and then up/down traffic with UDP. The test results where: 80 kb/s up with TCP and 600 kb/s with UDP. So I read the article you wrote and so I had the questions answered regarding why UDP was so fast. So here is my new question:

can I use UDP in the same way I use TCP? For example:

Can I send a packet from point A with IP address X.X.0.1 to point B with IP address X.X.0.2 with UDP when I know where it is supposed to drop down?

Hope you will get this message, it would solve several things for me, and help me understanding more of the internet.

Thank you on behalf

/Marcus Ogren

---

I might not hear this answer, so if please could just paste it into the original mail, and mail it to me later. That would be great! Thank you again.

BC AdBot (Login to Remove)

 


m

#2 Grinler

Grinler

    Lawrence Abrams


  • Admin
  • 43,389 posts
  • OFFLINE
  •  
  • Gender:Male
  • Location:USA
  • Local time:05:32 AM

Posted 12 July 2004 - 09:13 AM

Yes you can absolutely send UDP packets from one ip address to another. There is just no guarantee that it will get there. The major difference between TCP and UDP packets are that TCP packets are guaranteed to get to the location you specify otherwise a error will be generated. UDP on the other hand will do its best to get to the location you requested, but there is no guarantee, and no way of determining it it.

Usually the TCP side of tings uses more bandwidth compared to the DNS side, but it is not impossible for the reverse to be true. If you were constantly sending more UDP packets I would look further into what is running on your machine.

#3 Marcus

Marcus
  • Topic Starter

  • Members
  • 3 posts
  • OFFLINE
  •  
  • Local time:05:32 AM

Posted 12 July 2004 - 09:22 AM

Ok. My brother answered me like this, when I asked him if I was able to send packets to a specific address:

"You cant hear with your eyes or see with your ears. It's just designed like that, just drop it."

When I say "packets", I mean it like, for example, I can't send 1.32 MB of .jpg to my friend over MSN with UDP.

If you know some way to use UDP in this way, do tell me :thumbsup: Otherwise, I just have to stick with TCP :flowers:

#4 Grinler

Grinler

    Lawrence Abrams


  • Admin
  • 43,389 posts
  • OFFLINE
  •  
  • Gender:Male
  • Location:USA
  • Local time:05:32 AM

Posted 12 July 2004 - 10:01 AM

Well you can do this but would need a custom program in order to receive the UDP packets and be able to reorganize them back into the proper sequence and structure.

Why are you so interested in doing it via UDP anyway? TCP is the best way to send files as you provide a guarantee that the data needed will get to the final destination.

#5 Marcus

Marcus
  • Topic Starter

  • Members
  • 3 posts
  • OFFLINE
  •  
  • Local time:05:32 AM

Posted 12 July 2004 - 01:08 PM

Well, It's faster then UDP, and if it's small files, I think it's better to use UDP? :thumbsup: Well, as my call sign says, I'm a newbie :flowers:

#6 Grinler

Grinler

    Lawrence Abrams


  • Admin
  • 43,389 posts
  • OFFLINE
  •  
  • Gender:Male
  • Location:USA
  • Local time:05:32 AM

Posted 12 July 2004 - 01:49 PM

TCP tends to be quicker in transfering data than UDP.




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users