COMPUTER NETWORKING

APPLICATION LAYER

SOCKET INTERFACE PROGRAMMING

Question [CLICK ON ANY CHOICE TO KNOW THE RIGHT ANSWER]
For Creating a Socket, the syntax is ____
A
int sockid = socket(IP number, Port Number, MAC Address);
B
int sockid = socket(TCPNo, type, portno);
C
int sockid = sockid(family, type, protocol);
D
int sockid = socket(family, type, protocol);
Explanation: 

Detailed explanation-1: -In the UNIX domain, the SOCK DGRAM socket type is similar to a message queue. In the Internet domain, the SOCK DGRAM socket type is implemented on the User Datagram Protocol/Internet Protocol (UDP/IP) protocol. A datagram socket supports the bidirectional flow of data, which is not sequenced, reliable, or unduplicated.

Detailed explanation-2: -This address family provides interprocess communication between processes that run on the same system or on different systems. Addresses for AF INET sockets are IP addresses and port numbers. You can specify an IP address for an AF INET socket either as an IP address (such as 130.99.

Detailed explanation-3: -SOCK STREAM : Provides sequenced, two-way byte streams with a transmission mechanism for stream data. This socket type transmits data on a reliable basis, in order, and with out-of-band capabilities. In the UNIX domain [ AF UNIX ], the SOCK STREAM socket type works like a pipe.

There is 1 question to complete.