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

frames along with the rtp, For VOIP, first you need to consider the codec ...

For VOIP, first you need to consider the codec to use. Although there are many voice codecs, MyCo wants the safest bet and suggests that you design with the most known and oldest c

Name the 10base5 connectors, 10Base5 Connectors Transceiver - inter...

10Base5 Connectors Transceiver - intermediary device as well called a medium attachment unit (MAU) Performs CSMA/CD function may perhaps contain small buffer Atta

Modeling a wan, To model a WAN, we need a graph in which the nodes model sw...

To model a WAN, we need a graph in which the nodes model switches and the edges model direct join between switches. The modeling saves essence of network, and it ignores attached d

Firewall architectures-screening router, Screening Router In this setu...

Screening Router In this setup network router acts as a firewall. It checks all incoming and outgoing packets according to the predefined rules. This filter is placed at the c

Difference between a straight-through and crossover cable, What is the diff...

What is the difference between a straight-through and crossover cable? A straight-through cable is used to connect computers to a hub, switch, or router. A crossover cable is u

What is the difference between trigger and rule, What is the difference bet...

What is the difference between trigger and rule? The triggers are known as implicitly by database generated events, whereas stored procedures are known as explicitly by client

Computer Networking help, Hello, I have a question which is due tomorrow (2...

Hello, I have a question which is due tomorrow (2/15/2013) at 11:55pm. The configuration portion of the exercise has been completed. I only need the questions in bold answered (onl

Dns records and messages - application layer, DNS Records  and Messages ...

DNS Records  and Messages Two types  of records  are used DNS. The  question records  are used in the question  section of the query and response  messages. The resource  reco

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