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

What do mean by tunnel mode, What do mean by tunnel mode? This is a mod...

What do mean by tunnel mode? This is a mode of data exchange wherein two communicating computers do not use IPSec themselves. Instead, the gateway that is linking their LANs to

Describe any good security technology, Describe any good security technolog...

Describe any good security technology A good security technology should be powerful enough to support the features that the administrators need, including rules validation to i

Difference among the communication and transmission, Difference among the c...

Difference among the communication and transmission? Transmission is a physical movement of information and concern issues as bit polarity, synchronization, clock etc. Commu

Cycle of bridges, CYCLE OF BRIDGES:  A bridges network can join severa...

CYCLE OF BRIDGES:  A bridges network can join several segments. One bridge is useded to connect every segment to the rest of the bridge network. This is given in the figure be

Show scalability and reliability of computer network, How do you account fo...

How do you account for higher scalability and reliability of computer network? Ans: Computer network will have a large number of computers, which can share database, software

Define rs232 interface, Q. Define RS232 Interface? - Indicates the inte...

Q. Define RS232 Interface? - Indicates the interface between DTE and DCE: V.28 mechanical as well as electrical characteristics V.24: functional as well as procedur

Simplicity - transport layer, Simplicity The advantage of this approa...

Simplicity The advantage of this approach is the simplicity  of receiver buffering. The  receiver need not  buffer out of  order packets the sender must maintain the upper an

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