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

Diffrence between network vs internet layers, Q. Diffrence between Network ...

Q. Diffrence between Network vs Internet Layers? - Similar to all the other OSI Layers the network layer provides both connectionless and connection-oriented services. From th

What is error control, What is Error Control ? Error control is both er...

What is Error Control ? Error control is both error detection and error correction. It allows the receiver to inform the sender of any frames lost or damaged in transmission an

What is meant by asymmetric multiprocessing (amp), It imposes hierarchy and...

It imposes hierarchy and a division of labor between processors. Only one designated processor, the master, controls (in a tightly coupled arrangement) slave processors dedicated t

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

What are the basic key functions of data link layer, Q. What are the basic ...

Q. What are the basic key functions of data link layer? Ans: Data link layer transfers data in a structured and reliable manner so that the service given by the physical layer

The ip address ranges for public and private ip address, What are the IP ad...

What are the IP address ranges for public and private IP address?

Explain the term - primary memory and hard disk, Explain the term - primary...

Explain the term - primary memory and hard disk A peculiar situation arises when the existing server arrives at a stage when it cannot handle the requests quickly and most of i

Sorting using combinational circuit, Now, let us suppose a famous sequence ...

Now, let us suppose a famous sequence called as bitonic sequence and sort out the elements using a combinational circuit consisting of a set of comparators. The property of bitonic

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