This week's book giveaway is in the Java 8 forum.
We're giving away four copies of Java 8 in Action and have Raoul-Gabriel Urma, Mario Fusco, and Alan Mycroft on-line!
See this thread for details.
The moose likes Sockets and Internet Protocols and the fly likes UDP Packet Reassembly Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Java 8 in Action this week in the Java 8 forum!
JavaRanch » Java Forums » Java » Sockets and Internet Protocols
Bookmark "UDP Packet Reassembly" Watch "UDP Packet Reassembly" New topic
Author

UDP Packet Reassembly

Lerner O'Reilly
Greenhorn

Joined: Jun 16, 2011
Posts: 6
I searched and searched, to no avail.
I found, in many guides to Java Networking, that UDP packets have a chance of being split into smaller packets and/or conglomerated into bigger packets.
In either case, is the re-assembly of split packets, or the splitting of conglomerated packets done application-level or is it done in some lower level that I needn't be concerned with?
I understand that there is a chance that packets will not arrive, but do I have to deal with re-assembling packets myself?
I found a guide (non-Java-specific) that said that, in their UDP packets, they include two bytes which represent the size of the packet. Is this to ensure that the entire packet is received? Does this apply to me?
Thanks!
Lerner O'Reilly
Greenhorn

Joined: Jun 16, 2011
Posts: 6
I found a link that I /think/ answered my question. It would be nice if someone could confirm my understanding of it, though.
http://www.gamedev.net/topic/343577-fragmented-udp-packets/
All packet reassembly is done at the Network level, and I don't have to be concerned with it at Application level.
If a packet is not fully reassembled, it is not passed onto the application level.
If my understanding is correct OR incorrect, some validation would be nice.
Lerner O'Reilly
Greenhorn

Joined: Jun 16, 2011
Posts: 6
Also, when I was referring to packet length in my first post, that was actually specific to non-blocking TCP connections, I later realized, not UDP packets.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: UDP Packet Reassembly
 
Similar Threads
How come I can ping a machine?
Calulate net speed through applet
Multicast UDP Packet Loss
Setting the Type of Service (ToS) field in the IP header of a packet
file transfer using datagram