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 the Security Policy as well Integrated Security ? Security policy is on paper statement describing what assets are to be protected and why who is responsible and which

A statistical encoding algorithm is being considered for the transmission of a large number of long text files over a public network. Part of the file content is as follows: DOD

Introduction of DNS While discussing about the Internet, one things comes automatically in the n=mind and hence it is directly or indirectly depended on DNS. The DNS which sta

Recognize the command to disable CDP on an interface Ans) Router(config-if)# no cdp enable

Using a process server (such as inetd or xinetd) to listen on a set of well-popular ports and start one another server.  I said that it had much to do with overhead.  Say you set u




Advantages of VPNs Advantages discussed in the following  section include those related to security. Consolidation transparency cost. And administration. a. Improved secur

a) An Introduction/Overview of Network Security issues. b) A Risk Assessment  analysis- to include:             Assets                                                         T