View Single Post
Old 06-22-2005, 10:46 AM   #3 (permalink)
technobard
Centurion Nova Prime
 
technobard's Avatar
 
Join Date: May 2002
Location: Oak Park, IL (USA)
Posts: 285
technobard is on a distinguished road
Take at look at datagrams. Specificially, there is a DatagramSocket class. There is also a DatagramPacket class. The DatagramPacket has methods for setting the size of a packet for packets sent (outgoing). To receive packets, you have to specify the maximum allowed packet size. You'd have to write the specifics for tracking total bytes received for example, but it should be easily done based on the methods available (e.g. getlength(), getData() ). The problem with datagrams is that they do not guarantee delivery. Packets can arrive out of sequence or not at all.

Good luck! A google search on java.net DatagramPacket should give you more details.
Here's a good place to start: http://java.sun.com/j2se/1.4.2/docs/...ramPacket.html
__________________
It takes 2 points to draw a straight line, but at least 3 points to draw a conclusion.
technobard is offline   Reply With Quote