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

State the process of calculate the drift rate, State the process of calcula...

State the process of calculate the drift rate A drift rate of 10 -9 means 1 second in 109 seconds or 1 nsec every second. At OC-1 speed, say 50 Mbps for simplicity, a bit las

Merits of message passage-shared memory, Gives excellent low-level control ...

Gives excellent low-level control of parallelism; Portable; Minimal overhead in data distribution and parallel synchronisation; and It is less error prone. Drawb

Bluej programming, i have been given a question:- any 50 numbers are given ...

i have been given a question:- any 50 numbers are given and to find out the 1)frequency of odd and even numbers 2)frequency of positive and negative numbers

Determine about unique least-cost path, Determine about unique least-cost p...

Determine about unique least-cost path If there is a unique least-cost path, the two algorithms will yield the similar result because they are both guaranteed to search the lea

What are hold-downs used for, Hold-Down Timers - Routers ignore network upd...

Hold-Down Timers - Routers ignore network update information for a number of periods.

Status of the frame relay virtual circuit, Recognize the command to show th...

Recognize the command to show the status of the Frame Relay virtual circuit Ans) Router# show frame-relay pvc

Define the non-blocking and blocking network, Non-Blocking and Blocking net...

Non-Blocking and Blocking network In Non-blocking networks, route from a free input node to another free output node can forever be provided. Crossbar is an illustration of non

Distributed system, You should develop a system consisting of an applicatio...

You should develop a system consisting of an application acting as a broker and several agents that need to communicate between them. The agents can only communicate in pairs (i.e.

Explain about mesh topology, Q. Explain about Mesh Topology? - Dedicate...

Q. Explain about Mesh Topology? - Dedicated point-to-point links to each other device - n (n-1)/2 links an every device will have n-1 I/O ports - Advantages - Dedic

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