Question Bank - Computer Networks

Here's the question bank on all the computer networks topics.

Which one of the following socket API functions converts an unconnected active TCP socket into a passive socket?

A.
connect
B.
bind
C.
listen
D.
accept

Solution:

Connect:Actively attempt to establish a connection so this system call is doing something so we can say that this is activeBind:Bind the IP address and port address to the SOCKET connection so this system call is doing something so we can say that this is activeListen:Shows the willingness to accept connections.Listen system call just makes the machine wait for someone to send a SYN packet so it simply convert unconnected socket to passive socketThis system call is waiting for SYN packet so this system call not doing something so passive.Accept:Block the caller until a connection attempts arrives, it does something so active.Hence listen is the correct answer.

For more questions,

Click Here

Download Gyanm App

free current affairs for competitive exams

Scan QR code to download our App for
more exam-oriented questions

free current affairs for competitive exams

OR
To get link to download app

Thank you! Your submission has been received. You will get the pdf soon. Call us if you have any question: 9117343434
Oops! Something went wrong while submitting the form.