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

Explain the architecture and usage of isdn, Computer Networks 1. Write ...

Computer Networks 1. Write about different network structures in use. 2. Explain the architecture and usage of ISDN. 3. Describe the concept of framing in Data Link Layer

Explain token bus sublayer protocol, Token Bus Sublayer Protocol Se...

Token Bus Sublayer Protocol Send for some time then pass token If no data after that pass token right away Traffic classes 0, 2, 4 and 6 (highest) Internal s

Explain anti-aliasing techniques, Question: (a) Explain the issue assoc...

Question: (a) Explain the issue associated with vertices when the scan line scan line polygon fill algorithm is being applied? (b) Explain the logic of shortening edges to a

Firewalls - point to point, Firewalls After several  security  related ...

Firewalls After several  security  related internet  newsgroups  started overflowing  with posts it becomes  clear something  hand to done to help  secure  networks. The first

Determine the 802.11g ofdm, 802.11g OFDM a) Uses OFDM with same 2.4 GH...

802.11g OFDM a) Uses OFDM with same 2.4 GHz band b) Achieves a 54-Mbps data rate c) Works with same 802.11b equipment

Reliability - fundamentals of networks , Reliability Reliability  is t...

Reliability Reliability  is the measure of how  often  a network is usable. MTSF( Mean time  Between Failure) is a measure of the average time  a component  is expected to ope

use dijkstras shortest-path algorithm compute short path, Consider the fol...

Consider the following network example. With the indicated link costs along each link in the figure, use Dijkstra's shortest-path algorithm to compute the shortest path from x to a

What are called transactions, The grouped SQL statements are known as Trans...

The grouped SQL statements are known as Transactions (or) A transaction is a collection of actions embused with ACID properties.

Distortion, what is the differnce between noise and distortion

what is the differnce between noise and distortion

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