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

command saves the configuration stored in ram to nvram, Which command save...

Which command saves the configuration stored in RAM to NVRAM Ans) copy running-config startup-config is the command which saves the configuration stored in RAM to NVRAM

Illustrate network layer in osi layers model, Q. Illustrate Network Layer i...

Q. Illustrate Network Layer in osi layers model? Network Layer :  This is responsible for addressing messages and data so they are sent to the required destination, and for tr

What is piggy backing, What is Piggy Backing? A process called piggybac...

What is Piggy Backing? A process called piggybacking is used to get better the efficiency of the bidirectional protocols. When a frame is carrying data from A to B, it can also

Working of internet, As discussed in the earlier section each computer link...

As discussed in the earlier section each computer linked to the Internet has a unique address. Let's assume your IP address is 1.2.3.4 & you wish to send a message to the computer

Write a long note on internet and privacy, Question 1 Write a long note on...

Question 1 Write a long note on computers in television development Question 2 Write a long note on the ‘Steadicam' Question 3 Write a long note on Internet and pr

Which steps are used at receiver end by check sum, Q. Which steps are used ...

Q. Which steps are used at receiver end by check sum? The receiver follows these steps: The unit is divided into "k" sections each of "n" bits All sections are

Physical layer responsibilities of osi model, Q. Physical Layer Responsibil...

Q. Physical Layer Responsibilities of osi model? - Physical characteristics of interfaces as well as media - Representation of bits with no interpretation - Data rate is

What is routing region, What is routing region? When hierarchical routi...

What is routing region? When hierarchical routing is used, the routers are separated into what we call regions, with each router knowing all the details about how to route pack

How to identify connectivity problems- ccna, Identify Connectivity Problems...

Identify Connectivity Problems  Step 1: Use the ping command to test network connectivity. Use the following table to test the connectivity of every network device.

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