e network using pairs of datagram sockets. Fundamentals of EMS, NMS and OSS/BSS The two types of transport protocols commonly used for socket communication: TCP provides a reliable, connection oriented, and flow controlled sequenced channel of communication. Stream sockets are used with connection oriented protocols like TCP. UDP is used for intermittent transmission. It is performed in an unreliable connectionless channel. Though UDP preserves the message boundaries, they cannot perform sequencing and delivery functions. Datagram sockets are used with connectionless protocols like UDP. They deliver datagram to other endpoints. To add reliability, specific measures have to be taken in programming to check for packet loss, to resend packets when required. In programming, protocols are represented as numbers and not usually taken as constants. Below TCP or UDP, Internet protocol (IP) is used in the network layer for communication. 26.6 Basic Socket System Calls 1. socket: This function is used to create the socket of a given domain, type, protocol. #include <sys/types.h> #include <sys/socket.h> int socket (int domain, int soc_type, int protocol) ; // "domain" can be AF_INET or AF_UNIX. // "soc_type" is the socket type. It can be SOCK_STREAM for stream socket and SOCK_DGRAM for datagram socket. // "protocol" is usually set as zero. So the type defines the connection protocol within domain. 2. bind: This function is used to associate the socket id with an address to which other processes can connect. #include <sys/types.h> #include <sys/socket.h> int bind (int SOCID, struct sockaddr *addrPtr, int length) ; // "socID" is the id of the socket. // "addrPtr" is a pointer to the address family. Each domain has a different address family as defined in structure sockaddr. // "length" is the size of *addrPtr. Socket Communication 3. listen: This function is used by the server to specify the maximum number of connection requests allowed. That is the server queue size for connections from client. #include <sys/types.h> #includ