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
One of the most popular models for designing parallel algorithms is PRAM (Parallel Random Access Machine). A PRAM consists of unbounded number of processors interrelating with each

how to own cipher to encrypt and decrypt message by combine both substitution ans transposition algorithm using c program

Question 1 Write short notes on (i) Fiber Distributed Data Interface (ii) Serial Line Question 2 Explain Internet layer and transport layer Internet layer Tran

What are the IP address ranges for public and private IP address?

ARP is used to search a devices MAC address given an IP address.

Quetion: An amplifier increases the peak-to-peak voltage of a signal from 1 V to 20 V. What is the amplifier's gain in dB?

DNS Records  and Messages Two types  of records  are used DNS. The  question records  are used in the question  section of the query and response  messages. The resource  reco

Name the categories of Multiplexing? There are three categories of multiplexing a. Frequency Division Multiplexing (FDM) b. Time Division Multiplexing (TDM)    i. Sync

Mesh : This is two dimensional networks.  In this all processing elements are organised in a two dimensional grid. The processor in the row i and column j are indicated by PE i .

Recognize the command to show the Frame Relay map table Ans) Router# show frame-relay map is the the command to show the Frame Relay map table