Loading ...
Sorry, an error occurred while loading the content.

Sockets(Server and Client)

Expand Messages
  • Rupa
    Hello, I have small doubt regarding the working of sockets in case of server and client. I am using connection oriented stream. In backlog option of the
    Message 1 of 4 , Jan 8, 2003
    • 0 Attachment
      Hello,
      I have small doubt regarding the working of sockets in case of server and client. I am using connection oriented stream. In "backlog" option of the listen system call, I have specified 3. That is, I want server to listen to 3 client connections. How to synchronize the execution of 3 clients. I want to know the outline of the server program to synchronize the execution.

      Regards,
      Rupa

      [Non-text portions of this message have been removed]
    • deepak kotur
      check out the select system call..see man page ... __________________________________________________ Do you Yahoo!? Yahoo! Mail Plus - Powerful. Affordable.
      Message 2 of 4 , Jan 9, 2003
      • 0 Attachment
        check out the select system call..see man page


        --- Rupa <rupa.ramakrishna@...> wrote:
        > Hello,
        > I have small doubt regarding the working of
        > sockets in case of server and client. I am using
        > connection oriented stream. In "backlog" option of
        > the listen system call, I have specified 3. That is,
        > I want server to listen to 3 client connections. How
        > to synchronize the execution of 3 clients. I want to
        > know the outline of the server program to
        > synchronize the execution.
        >
        > Regards,
        > Rupa
        >
        > [Non-text portions of this message have been
        > removed]
        >
        >
        >


        __________________________________________________
        Do you Yahoo!?
        Yahoo! Mail Plus - Powerful. Affordable. Sign up now.
        http://mailplus.yahoo.com
      • Kiran Kumar
        Hi, I suppose the backlog is not to limit the number of clients that a server can talk to. It would specify the backlog , i.e., maximum length the queue of
        Message 3 of 4 , Jan 9, 2003
        • 0 Attachment
          Hi,
          I suppose the backlog is not to limit the number of
          clients that a server can talk to. It would specify
          the 'backlog', i.e., "maximum length the queue of
          pending connections". If when a client connection is
          being serviced, further connections arrive, these are
          made to wait in a queue. The limit of this queue is
          the backlog. Thus you could have a server servicing n
          number of clients, with its backlog as 3 (or
          whatever).
          To limit your server to 3 connections, you will have
          to use some other way like a global variable, or
          whatever.
          Correct me if I am wrong or got the question wrong.
          Regards,
          Kiran Kumar Immidi

          --- Rupa <rupa.ramakrishna@...> wrote:
          > Hello,
          > I have small doubt regarding the working of
          > sockets in case of server and client. I am using
          > connection oriented stream. In "backlog" option of
          > the listen system call, I have specified 3. That is,
          > I want server to listen to 3 client connections. How
          > to synchronize the execution of 3 clients. I want to
          > know the outline of the server program to
          > synchronize the execution.
          >
          > Regards,
          > Rupa
          >
          > [Non-text portions of this message have been
          > removed]
          >
          >
          >

          __________________________________________________
          Do you Yahoo!?
          Yahoo! Mail Plus - Powerful. Affordable. Sign up now.
          http://mailplus.yahoo.com
        • Harish V. Kulkarni
          hi!, What exactly you mean by synchronize. is it synchronization of memory or handling of any other resource. In any synchronization, semaphores can be used,
          Message 4 of 4 , Jan 9, 2003
          • 0 Attachment
            hi!,
            What exactly you mean by synchronize. is it synchronization of memory or
            handling of any other resource. In any synchronization, semaphores can be
            used, if server supports concurrent clients ( where each client will be
            handled by a separate process) or thread mutex keys can be used if server
            supports threads for each client.
            I got confused @ first instance!!.
            Hari

            -----Original Message-----
            From: Rupa [mailto:rupa.ramakrishna@...]
            Sent: Thursday, January 09, 2003 12:17 PM
            To: linux-bangalore-programming@yahoogroups.com
            Subject: [blug-prog] Sockets(Server and Client)


            Hello,
            I have small doubt regarding the working of sockets in case of server
            and client. I am using connection oriented stream. In "backlog" option of
            the listen system call, I have specified 3. That is, I want server to listen
            to 3 client connections. How to synchronize the execution of 3 clients. I
            want to know the outline of the server program to synchronize the execution.

            Regards,
            Rupa

            [Non-text portions of this message have been removed]




            ---------------------------------------------------------------
            This is the programming list of the Bangalore Linux Users Group
            ---------------------------------------------------------------
            Go to http://linux-bangalore.org for more information
            about us, as well as our other mailing lists

            Before you post to this list, please read
            http://linux-bangalore.org/articles/smart-questions.php


            Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.


            [Non-text portions of this message have been removed]
          Your message has been successfully submitted and would be delivered to recipients shortly.