UDP Socket Programming Presenter: Chelsea
Outline What is UDP What is Socket How to write a socket programming with UDP Reference
UDP (User Datagram Protocol) It’s a connection-less oriented protocol Simpler and less overhead compared to TCP No congestion control and No error control Examples of application layer who using UDP: SNMP (Simple Network Management Protocol) DNS (Domain Name System) TFTP (Trivial File Transfer Protocol) RTP (Real-time Protocol) DHCP (Dynamic Host Configuration Protocol) SNTP (Simple Network Time Protocol)
What is Socket To establish a connection between one host and another in a network End points of communications Can be used to send and receive data Socket types Stream sockets– uses TCP which is connection-oriented Datagram sockets– uses UDP which is connectionless
Socket() Bind() Recv() Send() Close() Server Client Data transmission
Socket for Server Socket(int domain, int type)
Socket for Client
Questions and Comment
Reference UDP communication What is Socket What is UDP