Discuss about the different types of socket calls using in TCP &UDP.
The communication features visible to a user are defined by socket types. TCP/IP transport protocols are accessed through the Internet family sockets. For sockets that may communicate over both IPv6 and IPv4, the variable AF INET6 is used to identify the Internet family. For source compatibility with older apps and "raw" access to IPv4, the variable AF INET is also supported.
Stream sockets allow TCP communication between programs. With no record boundaries, a stream socket enables bidirectional, reliable, sequential, and unduplicated data flow. Data can be read from and written to these sockets as a byte stream once the connection has been established. SOCK STREAM is the socket type. Datagram sockets allow processes to interact via UDP. A datagram socket allows messages to flow in both directions. A datagram socket process can receive messages in a different order from the sending sequence, as well as duplicate messages. The data's record boundaries are retained. SOCK DGRAM is the socket type.
Comments
Leave a comment