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

The concept of universal service, The major problems with multiple networks...

The major problems with multiple networks are as given: A computer attached to a given server can only interact with other computers attached to the similar network.

Ieee specification for spanning tree protocol, What is the IEEE specificati...

What is the IEEE specification for Spanning Tree Protocol Ans) IEEE 8021.d Spanning Tree Protocol (STP) was developed to stop routing loops in a network. If a router, switch, or

Administrative distance of 0 mean, Directly linked network have the lowest ...

Directly linked network have the lowest administrative distance of 0. They are considered the most reliable.

What is the purpose of arp, ARP is used to search a devices MAC address giv...

ARP is used to search a devices MAC address given an IP address.

Different kinds of firewall architectures, What are the different kinds of ...

What are the different kinds of firewall architectures?

What is primary and secondary ring - fddi, What is primary and secondary ri...

What is primary and secondary ring One of the two FDDI rings is known as the primary ring; the other is called the secondary ring. The primary ring is utilized for data tra

Different types of subnet classfull networks are present, How many dissimil...

How many dissimilar types of subnet classful networks are present?

Which layer is responsible for coordinating communication , Which layer is ...

Which layer is responsible for coordinating communication between systems Ans) The Session layer performs the following: Responsible for establishing and maintaining connections

Assigment, what the domain name of 128.252.160.2000

what the domain name of 128.252.160.2000

Characteristics of udp, UDP sends packets 'blind' down the network, and rel...

UDP sends packets 'blind' down the network, and relies on upper-layer protocols to form connections and identify errors. TCP is a connection-oriented protocol that can give reliabl

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