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
Write discussion on Associative mapping - computer architecture.

Normal 0 false false false EN-IN X-NONE X-NONE MicrosoftInternetExplorer4

Other than performance  issues, there could be security reasons for using something like xinetd.  Make simple design in which a new version of xinetd gives a layer of security.

Issues with Bridges Connecting Different LANs - Frame format - differences in frame structure, fields used (example Ethernet to Token Ring) - Payload size - size of data en

Determine the Application areas of intranet The uses of an Intranet are only limited by imagination. Some of the larger sectors where the Intranet can be easily and success fu

Latency : In interconnection networks a variety of nodes may be at dissimilar distances depending upon the topology. The network latency differs to the worst-case time wait for a u

Set Cookies 1178345 When  Hussan  browser receives  the HTTP response  message it sees the set cookies header. The  browser then appends  a line to the special cookie file  th

State about the Cell sectoring With cell sectoring, a cell is separated into a number of wedge-shaped sectors, each with its own set of channels, typically 3 or 6 sectors per c

Recognize the command to view the configuration-register value Ans) show version is the command to view the configuration-register value

Explain about the Digital traffic channels The most notable difference among the two generations is that first generation systems are almost purely analog, while second generat