What is the use of socketpair()?

Answer Posted / karnveer singh

socketpair can used when parent child process wants to communicate, while using socketpair you dont need to use the name socket for example, no need to use bind , connect and etc.
On simply returned socket descriptor assume socket[0], socket[1], you could perform read and write operation.

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How to Deal with Duplicated Sockets?

1151


How to Choose a Socket Type?

932


What is the use of PF_LOCAL and SOCK_STREAM?

1196


How to read socket file in linux?

500


How to Understand Netmask Values?

945






What is the use of PF_INET and SOCK_STREAM?

994


What is the Use of the inet_makeaddr() Function?

947


How TCP/IP Handles Lost Packets?

1234


How to Bind a Specific Interface Address?

987


Are udp sockets bidirectional?

476


How to Test with No Server?

1092


Why socket programming is used?

481


What is a socket in linux?

503


What is the use of setprotoent(3) Function?

1139


How does socket communication work?

479