P. 1
User Datagram Protocol

User Datagram Protocol

|Views: 19|Likes:
Published by Anand Villa

More info:

Published by: Anand Villa on Jan 29, 2012
Copyright:Attribution Non-commercial

Availability:

Read on Scribd mobile: iPhone, iPad and Android.
download as DOC, PDF, TXT or read online from Scribd
See more
See less

09/24/2013

pdf

text

original

USER DATAGRAM PROTOCOL • • • • • The User Datagram Protocol (UDP) is one of the core members of Internet Protocol suite

, the set of network protocols used for the internet. Computer applications can send messages, referred to as datagrams, to other hosts on an Internet Protocol network without requiring prior communications to set up. UDP is sometimes called as Universal Datagram Protocol. UDP uses a simple transmission model without implicit hand-shaking dialogues for guaranteeing reliability, ordering or data integrity. UDP is compatible with packet broadcast and multicasting

Socket()

Socket()

Bind() Sendto() Recvfrom() Blocks until data received from client Recvfrom() Sendto() Close() Close()

Recvfrom() and sendto() int sendto(int sd, char *buff,int len, int flags, (struct sockaddr *)&addrsp, int addrlen) • • • • • • Sd Buff Len Flags Addrp Addrlen : socket file descriptor : address of the buffer : size of the buffer : usually 0 : address of process : length of the process address

(struct sockaddr *)&addrsp.int recvfrom(int sd.int len. char *buff. int *addrlen) • • • • • • Sd Buff Len Flags Addrp Addrlen : socket file descriptor : address of the buffer : size of the buffer : usually 0 : address of process : length of the process address . int flags.

You're Reading a Free Preview

Download
scribd
/*********** DO NOT ALTER ANYTHING BELOW THIS LINE ! ************/ var s_code=s.t();if(s_code)document.write(s_code)//-->