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

Explain radio wave, Explain Radio Wave. Although Radio waves are common...

Explain Radio Wave. Although Radio waves are common and well understood, we are just starting to realize their enormous potential as a networking medium. Radio waves can operat

Which protocol resolves an ip address to a mac address, The Address Resolut...

The Address Resolution Protocol (ARP) sends out a broadcast to verify the MAC address from the IP address.

Encoding data options in parallel virtual machine , Encoding data options ...

Encoding data options PVM uses SUN's XDR library to generate a machine independent data format if you request it. Settings for the encoding option are: PvmDataDefault: Use X

What is ring topology, What is Ring Topology? The physical ring topolog...

What is Ring Topology? The physical ring topology is a circular loop of point-to-point links. Every device connects directly to the ring or indirectly by and interface device o

Telecommunication switching system, if the signal input to an amplifier is ...

if the signal input to an amplifier is 0 dBm what is the power output in mW if the gain of the amplifier is 20 dB ?

Routing in a wan, As there will be more devices there will be more traffic ...

As there will be more devices there will be more traffic of information. We can include capacity to WAN by adding more links and packet switches. Packet switches use not have compu

Illustrate keep alive and time-waited timer, Q. Illustrate Keep alive and T...

Q. Illustrate Keep alive and Time-Waited Timer? Keep alive timer To prevent a long inactive connection between two TCPs - Either client or server crash

Ethernet interface on the cisco router , As a system administrator, you req...

As a system administrator, you require to set up single Ethernet interface on the Cisco router to permit for both sap and Novell-ether encapsulations. Which set of commands will ac

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