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
Q. Show Nonreturn to Zero encoding? - Value of signal is for all time positive or negative - NRZ-L Signal level depends on bit represented; positive typically means 0

Name the layer responsible for putting 1s and 0s into a logical group? Ans) Frames are broken down into 1s and 0s and placed onto the physical medium by the Data Lin layer.


At the minimum level most networks sends individual packets of data and the network needs each packet to follow an exact format dictated by the hardware, which is known service par

SONET STS SONET defines a hierarchy of signalling levels called as STSs (Synchronous Transport Signals). Every STS level supports a certain data rate specified in megabits p

Path  Overhead It is part  of SPE  and contain followings  information: Performance monitor of synchronous transport , signal , path , track ,parity ,checks,  and path  status.

Network Protocols In computer  networks  communication  occurs between  the entities in different  systems an entity  is anything  that is  capable  of sending  or receiving

Q. What are the basic key functions of data link layer? Ans: Data link layer transfers data in a structured and reliable manner so that the service given by the physical layer


State the Steps to provide more computing power In order to provide more computing power, the following steps may be taken: Add more processing power by addition of more