UDP Programming, Computer Networking

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
Posted Date: 11/12/2012 12:21:32 AM | Location : Singapore







Related Discussions:- UDP Programming, Assignment Help, Ask Question on UDP Programming, Get Answer, Expert's Help, UDP Programming Discussions

Write discussion on UDP Programming
Your posts are moderated
Related Questions
Q. Show the CRC-Performance ? CRC-Performance CRC is able to detect all burst errors that affect an odd number of bits CRC is able to detect all burst errors of

Q. What do you mean by Flow Control? - How much data sender is capable to transmit before receiving the ACK - Why flow control? - Limitation with receiver 1. Processin

S t d "B" 6.4 m Ku-BAND EARTH STATION (2004)   D-Sat (District Satellite Project) circuits for rural connectivity via satellite are in operation. Purpose of this project i

Optimizing STP  Because there is a separate instance of the spanning tree for every active VLAN, a separate root election is conducted for each instance. If the default switch p

Q. Show the Error control in TCP? Error control in TCP Detect lost segments, out-of-order segments, corrupted segments and duplicated segments Three tools: chec

Problem 1 Bring out the differences between POP and IMAP4 Problem 2 Discuss User Datagram protocol Problem 3 Explain the various steps in TCP congestion control

At the Physical layer of the OSI model Repeaters work by regenerating the signal to extend the distance it can travel.

What is Network Architecture? When two or more computer are linked with one another for the purpose of communicating data electronically, besides physical connection of comput

Explain the technique- Backpressure This technique produces an effect same to backpressure in fluids flowing down a pipe. It includes link-by-link use of flow control in a dire

OSPF ( open Shortest Path First) Open shortest  path first  is a routing  protocols  developed for internet protocols networks by the  interior  gateway protocols working group