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

Latency and scalability, Latency : In interconnection networks a variety of...

Latency : In interconnection networks a variety of nodes may be at dissimilar distances depending upon the topology. The network latency differs to the worst-case time wait for a u

Determine in detail about the world wide web, Determine in detail about the...

Determine in detail about the world wide web The latest has been Web commerce that is currently making big news, and many businesses are setting up electronic shops on the Inte

Difference between latches and flip flops, What is the basic difference bet...

What is the basic difference between latches and flip flops? Ans) flip flops have clock signal whereas latches dont require anyclock pulse..

Multicast extension to ospf, MOSPF MOSPF is multicast extension to OSP...

MOSPF MOSPF is multicast extension to OSPF. This protocol is extension of OSPF which is a unicast routing protocol which make MOSPF a combination of unicast and multicast prot

What is the difference between a hub and a switch, What is the difference b...

What is the difference between a hub and a switch? A hub acts as a multiport repeater. Though, as more and more devices connect to it, it would not be able to efficiently manag

Quality of service, Networks are more frequently being prepared to allow sp...

Networks are more frequently being prepared to allow specification of the quality of service needed by users. For example: - a typical voice telephone call may give a QoS para

What is a vlan, VLAN - Virtual Local Area Network Vlan is a logical grou...

VLAN - Virtual Local Area Network Vlan is a logical grouping or segmenting a network linked to administratively described ports on a switch, they give Broadcast control, Securit

How receiver detects error, How receiver detects error The frame is 100...

How receiver detects error The frame is 10011101. The generator is 1001. The message after appending the three zeros is 10011101000. The reminder on dividing 10011101000 by 100

Illustrate the working of networking bus topology, Illustrate the working o...

Illustrate the working of networking Bus Topology All stations attach, by appropriate hardware interfacing called as a tap, directly to a linear transmission medium, or bus. F

Describe in details about applications of computer networks, Describe in de...

Describe in details about applications of Computer Networks ?

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