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

Wifi and 3g, what is similarity of wifi and 3g

what is similarity of wifi and 3g

Authentication mechanism in vpn, What are the dissimilar ways authenticatio...

What are the dissimilar ways authentication mechanism in VPN?

Show coaxial cable connectors, Q. Show Coaxial Cable Connectors? - A mo...

Q. Show Coaxial Cable Connectors? - A most common is barrel connector (BNC) - T-connectors are utilized to branch off to secondary cables - Terminators are necessary for

Show VLAN membership and configuration, Q. Show VLAN Membership and Configu...

Q. Show VLAN Membership and Configuration? VLAN Membership - May be classified by - Switch port numbers - MAC addresses - IP addresses - IP multicast addresse

State the example of security audit as case study, State the Example of sec...

State the Example of security audit as case study Linda narrates one of her experience about a security audit. She was performing a spot audit where she was checking certain

Explain the term dimensionality of interconnection network, Dimensionality ...

Dimensionality of Interconnection Network Dimensionality refers the arrangement of processing elements or nodes in an interconnection network. In linear network or single dimen

Command that forces the router to load into ROM, Determine the command that...

Determine the command that forces the router to load into ROM mode upon a reload?  Ans) boot system rom ia the command that forces the router to load into ROM mode upon a reload

Cost involved in inter-processor communication, Cost Involved in Inter-Proc...

Cost Involved in Inter-Processor Communication As the data is assigned to many processors in a parallel computer while implementing a parallel algorithm, the processors might

Name the steps included in creating the checksum, List the steps included i...

List the steps included in creating the checksum. a. Separate the data into sections b. Add the sections together using 1's complement arithmetic c. Take the complement o

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