Send a suggestion!

We're building a brand new version of the site, and we'd love to hear your ideas

Members

Technology Zones

IBM Learning Center

Articles

Hosted By

MaximumASP

Info

Rated
Read 120,528 times

Contents

Related Categories

Introduction to TCP/IP - User Datagram Protocol

User Datagram Protocol

Unlike TCP, the User Datagram Protocol (UDP) does not present data as a stream of bytes, nor does it require that you establish a connection with another program in order to exchange information. Data is exchanged in discrete units called datagrams, which are similar to IP datagrams. In fact, the only features that UDP offers over raw IP datagrams are port numbers and an optional checksum.

UDP is sometimes referred to as an unreliable protocol because when a program sends a UDP datagram over the network, there is no way for it to know that it actually arrived at it's destination. This means that the sender and receiver must typically implement their own application protocol on top of UDP. Much of the work that TCP does transparently (such as generating checksums, acknowledging the receipt of packets, retransmitting lost packets and so on) must be performed by the application itself.

With the limitations of UDP, you might wonder why it's used at all. UDP has the advantage over TCP in two critical areas: speed and packet overhead. Because TCP is a reliable protocol, it goes through great lengths to insure that data arrives at it's destination intact, and as a result it exchanges a fairly high number of packets over the network. UDP doesn't have this overhead, and is considerably faster than TCP. In those situations where speed is paramount, or the number of packets sent over the network must be kept to a minimum, UDP is the solution.

Comments

  • Re: [28] Introduction to TCP/IP

    Posted by drkarthik on 25 Aug 2006

    hi

    This is possible using threads in the client program. the client can generate parallel connections using threads. so u can create multiple clients in the same system.


    In the serv...

  • Re: [28] Introduction to TCP/IP

    Posted by msshweta on 05 Apr 2006

    hi i want to make socket connection for the multiple clients li...

  • Socket Application doubt

    Posted by Suganya on 06 Feb 2006

    Hi,

    Iam developing the socket application.In this the remote host is sending messages.But iam not able to pick all the messages sent by the remote host.If remote is sending 10 msgs,then iam able to...

  • help for all programmers needing client server app

    Posted by ranaasim on 15 Dec 2004

    there would b two applications one will be at server the other will be at client side
    i m sending this code asuming that u have some prior knowledge about network programming
    include this code at s...

  • Help

    Posted by Anu2000 on 27 Aug 2004

    Hi. I read ur message. I'm doing a (socket programming) chatty client/server messenger program too and I need lots of help. I heard you have done it. Could u send me ur source code and i could refer t...