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

Describe the automatic repeat request protocol, Question 1: (a) In net...

Question 1: (a) In networking, there are different possible topologies. Explain the Linear bus, Ring and Star topology along with their advantages and disadvantages. (b) W

cisco ios for which encapsulation, "arpa" is used by the Cisco IOS for whi...

"arpa" is used by the Cisco IOS for which encapsulation types Ans) Ethernet_II

How are enterprise systems different, Question : (a) How do you relate ...

Question : (a) How do you relate the subsequent terms in the context of an information system: data, information and decision-making. (b) Why do you think organisations nowa

Explain the meaning of negotiation, Explain the meaning of Negotiation ...

Explain the meaning of Negotiation Negotiation is process of getting both sides to agree on some values or parameters to be used during communication. Maximum packet size is on

Determine power dissipated in resistor, Question: With Vout not connect...

Question: With Vout not connected to any additional circuitry, what power is dissipated in the 7 kW resistor?

Quality of service - multiplicative decrease, Q. Quality of Service - multi...

Q. Quality of Service - multiplicative decrease? Quality of Service The collective consequence of service performance which determines the degree of satisfaction of a

Give some examples of the session layer, Session layer examples are Netbios...

Session layer examples are Netbios Names, SQL, NFS, X Windows, and RPC

Protocols and standards - cable network architecture, Q. Protocols and Stan...

Q. Protocols and Standards - Cable Network Architecture? - Essential in creating as well as maintaining an open and competitive market for equipment manufacturers and in guaran

Distance vector and link-state protocol, What's the difference among distan...

What's the difference among distance vector and link-state protocol?

Define internet network address, Q. Define internet network address? ...

Q. Define internet network address? The internet network address is additional commonly called the -IP address.? It consists of 32 bits a few of which are allocated to a hi

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