UDP Programming, Computer Networking

I have a larget text file of 1MB, how do i break down into chunks of packets to send over UDP?

byte b[]=new byte[1024];
FileInputStream f=new FileInputStream("input.txt");
DatagramSocket dsoc=new DatagramSocket(2000);
int i=0;
while(f.available()!=0)
{
b[i]=(byte)f.read();
i++;
}
f.close();
dsoc.send(new DatagramPacket(b,i,InetAddress.getLocalHost(),1000));

this doesnt seems to work
Posted Date: 11/12/2012 12:21:32 AM | Location : Singapore







Related Discussions:- UDP Programming, Assignment Help, Ask Question on UDP Programming, Get Answer, Expert's Help, UDP Programming Discussions

Write discussion on UDP Programming
Your posts are moderated
Related Questions
Increasingly it is the quality of the interface of mobile phones that are giving competitors the edge.  Users not only make selections based on cost but also functionality and cert

Question 1 requires you to develop firewall rules based on a fictitious organisation. Scenario: You work for a security-conscious company, xC-Cure, who develop encryption t


Q. What is Retransmission timer? Retransmission timer if an ACK is received previous to the timer goes off - destroy the timer if the timer goes off before ACK a


The three phase of PPP session establishment are:-  A. Link establishment phase  B. Authentication phase  C. Network layer protocol phase

Example Programmes for Parallel Systems Now we shall complete this with the examples on shared memory programming. Example 13: Adding elements of an array using two proce

Thicknet Characteristics It Supports transmission rates up to 10 Mbps in Baseband mode Less expensive in comparison of fiber-optic cable however more expensive than ot


A mobile host (MH) is connected to a WLAN access network that uses MIP for mobility support. Consider that the RTTs between MH and HA are 0.3s while RTTs within a L2 subnet are 80