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

What are all the Base services provided by the OS? Interprocess communications (IPC) Task preemption Task priority Local/Remote Interprocess communication Semaphor

TCP creates a reliable data transfer service, in addition to IP''s unreliable best-effort service. Study the related sections of the text, and in your own words, summarize how TCP

Any protocol used by an internetwork to exchange routing data within an autonomous system. E.g. RIP, IGRP and OSPF.

a) Manages protocol access to the physical network medium b) Permits multiple devices to uniquely signify one another on the data link layer

Router# reload is the command to reload the router

- The ISO (International Organisation for Standardisation) is an International standards organisation responsible for a wide range of standards including many that are relevant to

I have a research in this topic " Mitigating DoS Attacks against Broadcast Authentication in Wireless Sensor Networks " with simulation


The application layer This  layer enables users  to access the  network  by providing  a few  services to the user some of the protocols and services available to the  user ar