dcsimg
IP packet
3 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   mohamed_mostafa
Posted On:   Saturday, July 7, 2001 12:44 PM

what is the difference between IP packet and UDP packet?

Re: IP packet

Posted By:   vats_007_a  
Posted On:   Friday, January 4, 2002 09:13 AM

well, enough has already been said about the diff,here i would like to add that an communication involving IP packets is more reliable hence has more overheads also,whereas UDP,less reliable so less overhead also,during implementation also,in tcp/ip connection,we need to have seperate sockets for server and client ,for UDP we can use same SOCKET class object for connection

Re: IP packet

Posted By:   Simon_Ablett  
Posted On:   Wednesday, September 5, 2001 07:50 AM

If you want to know all there is to know about TCP/IP read the books by W Richard Stevens on the subject.Published by Prentice-Hall and in two volumes. Vol 1 = protocols, vol 2 = the implementation. They are oriented towards C programmers but give an indepth explanation and are the definitive tomes on TCP/IP and related subjects. Available from Amazon. Regards.

Re: IP packet

Posted By:   Andrew_Cartine  
Posted On:   Sunday, July 8, 2001 11:55 AM


Can you be much more specific about what you want to know and why?



I'll risk offending you and give you the simple answer. If you already knew this, at least it'll give you a basis upon which you can clarify what it is you want to know.



TCP/IP is a persistent connection. I am not an expert in the "under-the-hood" implementation of TCP/IP, but I can tell you that the data delivery is "guaranteed." All this means is that you'll know for sure whether or not the data got there. If you send data and there is a delivery failure at any point, the OS will let the JVM know and you'll have the chance to resend the data. For large volumes of critical data, TCP/IP is necessary to ensure data integrity.



Because of all the implementation details necessary to guarantee delivery, TCP/IP is by nature much more "expensive" to use than UDP.



UDP is not guaranteed and it is not persistent. This means that once you send the data, the OS/JVM is probably not going to know whether or not the data was delivered successfully. Because there is less overhead, UDP is faster than TCP/IP.


In my experience, I find that many developers use UDP for the speed, and write their own messaging to monitor delivery and receipt. This is especially useful for non-critical applications like chat-rooms, where if
one sentence in a thousand gets lost, it's unlikely anybody's going to be fired for it.

About | Sitemap | Contact