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
Data Parallel Programming In the data parallel programming model, main focus is on performing simultaneous operations on a data set. The data set is typically prepared into a c

Define the Types of Computer Network Computer networks fall into three classes regarding the size, distance and the structure namely: LAN (Local Area Network), MAN (Metropolita

Connecting Devices of bridges - Five kinds: - Repeaters - Hubs - Bridges - Two- and three-layer switches - Repeaters and hubs - layer one of Internet model -

What is Framing? Framing in the data link layer divides a message from one source to a destination, or from other messages to other destinations, by adding a sender address and

Example of transport layer are:- a) TCP is connection oriented. b) UDP is connectionless

Consider the following network example. With the indicated link costs along each link in the figure, use Dijkstra's shortest-path algorithm to compute the shortest path from x to a

Advantages of LS over DV algorithm There  are a number of advantages to link  state  protocols  especially when  compared to  the distance vector based  routing  protocols. The

ENCODING THE DATA TYPE: The figure explain a frame in which the data kind is specified by using the data area. To ensure interoperability format of encoding location m

Can you define the concept of Repeaters, Hubs, Bridges, Switches and Routers?