UDP Programming, Computer Networking

Assignment Help:
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

Related Discussions:- UDP Programming

Advantages and disadvantage of computer networking , Advantages and Disadva...

Advantages and Disadvantage of Computer Networking Most of the benefits  of networking  can be  divided into  two  generic categories Connectivity and  sharing. Networks

Explain the term- bits and bitmap, Explain teh term- Bits and Bitmap ...

Explain teh term- Bits and Bitmap Many tiny dots, which are put together to make a picture. Bits are combined to make a graphic image called a bitmap. GIF and JPEG files are

Differentiate lan and wan, Question 1 Differentiate LAN and WAN Questi...

Question 1 Differentiate LAN and WAN Question 2 Explain the TCP/IP Reference Model with diagram Question 3 Describe Circuit switching and message switching Question

How are enterprise systems different, Question : (a) How do you relate ...

Question : (a) How do you relate the subsequent terms in the context of an information system: data, information and decision-making. (b) Why do you think organisations nowa

Show the basic handover types in umts, Question: (a) Show the main elem...

Question: (a) Show the main elements of the GSM system architecture and describe their functions. (b) Looking at the HLR/VLR database approach used in GSM-how does this arc

Icmp process, Some of the ?elds of IP and ICMP datagrams will be ?xed, some...

Some of the ?elds of IP and ICMP datagrams will be ?xed, some will be settable by the application, and others will computed according to the situation. You must set all ?elds of th

Explain in brief about crc, What is CRC The CRC is computed while trans...

What is CRC The CRC is computed while transmission and appended to output stream as soon as last bit goes out onto wire. If the CRC were in header, it will be necessary to make

Write Your Message!

Captcha
Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd