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

What is the purpose of configuration files for servers, Question 1: a) ...

Question 1: a) Give three examples of Shells in Linux. b) Differentiate between the Join command and the Paste command in Linux, use an example to support your answer.

Types of Networking, How can I identify the difference types of networks

How can I identify the difference types of networks

Name the factors that affect the performance of the network, Name the facto...

Name the factors that affect the performance of the network? a. Number of Users b. Type of transmission medium c. Hardware d. Software

What is network address, Q. What is Network Address? Network Address ...

Q. What is Network Address? Network Address First address in the block, assigned to the organization Defines the network itself and cannot be assigned to a host

Software overheads in parallel programming , Besides these hardware overhea...

Besides these hardware overheads, there are certain software overheads imposed by libraries, parallel compilers, tools and operating systems. The parallel programming languages

Define retransmission, Define Retransmission? Retransmission is a proce...

Define Retransmission? Retransmission is a process in which the receiver detects the occurrence of an error and asks the sender to resend the message. Resending is repeated unt

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