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

Thrift Towne, what role would you assign for Pentium iii, 500 MHz processor...

what role would you assign for Pentium iii, 500 MHz processor, 256 MB memory, 1o GB hard drive

The ip address ranges for public and private ip address, What are the IP ad...

What are the IP address ranges for public and private IP address?

Explain about switched ethernet, Switched Ethernet In switched netw...

Switched Ethernet In switched networks a switch device identifies the destination address and routes the frame to the specific port to which the destination station is conn

Show the security policy as well integrated security, Q. Show the Security ...

Q. Show the Security Policy as well Integrated Security ? Security policy is on paper statement describing what assets are to be protected and why who is responsible and which

Reliable data transfer - transport layer, Reliable Data Transfer Figur...

Reliable Data Transfer Figure illustrate the  framework for reliable  transfer. The service  abstraction provided  to the upper  layer  entities is that  of a reliable channel

Butterfly permutation, Butterfly permutation This permutation is gettin...

Butterfly permutation This permutation is getting by interchanging the important significant bit in address with smallest significant bit.

What is internet, What is Internet? Internet is a collection of network...

What is Internet? Internet is a collection of networks or network of networks. Various networks like LAN and WAN connected by suitable hardware and software to work in a seamle

Packet processing on vpn router, Consider the site-to-site VPN scenario sho...

Consider the site-to-site VPN scenario shown in Figure 2. Let's deploy the AH protocol on the two VPN routers so that no desktop on the two sites need to do any AH operations. Assu

Explain network services, Explain Network Services Network services are...

Explain Network Services Network services are the thing that a network can do. The main networking services are File Services: This contains file transfer, storage, data m

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