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 about twisted-pair cable, Q. Explain about Twisted-Pair Cable? ...

Q. Explain about Twisted-Pair Cable? - Two conductors surrounded by insulating material - One wire utilize to carry signals and other used as a ground reference - Twistin

Explain categorization according to instruction and data, Categorization ac...

Categorization according to kind of instruction and data According to types of instruction and data subsequent types are identified under this classification: Scalar Pi

Network protocols - computer networks, Network Protocols In computer  ...

Network Protocols In computer  networks  communication  occurs between  the entities in different  systems an entity  is anything  that is  capable  of sending  or receiving

Telecommunication switching system, if the signal input to an amplifier is ...

if the signal input to an amplifier is 0 dBm what is the power output in mW if the gain of the amplifier is 20 dB ?

How does a switch use store and forward, The LAN switch copies the whole fr...

The LAN switch copies the whole frame into its onboard buffers and then looks up the destination address in its forwarding, or switching, table and verifies the outgoing interface

Routing and routed protocols, What is difference among routing and routed p...

What is difference among routing and routed protocols? Ans) i) Routing use for top path selection ii) Routed protocol carries on source and destination information.

Explain about the cell splitting, Cell splitting  In practice, the dist...

Cell splitting  In practice, the distribution of traffic and topographic features is not uniform, and this shows opportunities of capacity enhance. Cells in areas of high usage

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

Show the tcp connections, Q. Show the TCP connections? Connection estab...

Q. Show the TCP connections? Connection establishment Three-way handshake Why is two-way handshake not enough? Connection termination Four steps

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