GeeksforGeeks » Multiple Choice Questions

A GATE 2008 question

(2 posts)
  1. nitish
    guest
    Posted 8 months ago #

    A client process P needs to make a TCP connection to a server process S. Consider the following situation: the server process S executes a socket (), a bind () and a listen () system call in that order, following which it is preempted. Subsequently, the client process P executes a socket () system call followed by connect () system call to connect to the server process S. The server process has not executed any accept () system call. Which one of the following events could take place?
    (A) connect () system call returns successfully
    (B) connect () system call blocks
    (C) connect () system call returns an error
    (D) connect () system call results in a core dump

  2. vs4vijay
    guest
    Posted 7 months ago #

    (B.) connect () system call blocks

    Server Blocks the connection until it calls accept() method to get client socket...


Reply

You must log in to post.

RSS feed for this topic