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

Building and running mpi programs, MPI parallel programs are written with c...

MPI parallel programs are written with conventional languages like, C and Fortran  .One or more header files such as "mpi.h" may be needed to give the necessary definitions and dec

Multiple activity charts, A multiple activity chart records the related ...

A multiple activity chart records the related sequence of activities of more than one subject, men and / or machine on a common time scale showing the relationship between

Topologies, discuss communication isolation and privatization in network to...

discuss communication isolation and privatization in network topologies

What is cross over cable, Q. What is Cross over cable? - Cross the crit...

Q. What is Cross over cable? - Cross the critical pair to properly transmit, align and receive signals on devices with like connections. - Pin 1 connected to pin 3 as well a

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

Explain data communications, The distance over which data moves within a co...

The distance over which data moves within a computer may differ from a few thousandths of an inch, as is the case within a one IC chip, to as much as lot of feet along the backplan

Explain the meaning of negotiation, Explain the meaning of Negotiation ...

Explain the meaning of Negotiation Negotiation is process of getting both sides to agree on some values or parameters to be used during communication. Maximum packet size is on

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