linux-c-programming.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: ronkhu <ronkhu@ntsp.nec.co.jp>
To: linux-c-programming <linux-c-programming@vger.kernel.org>
Subject: Re: question on socket connection
Date: Mon, 26 May 2003 10:30:17 +0800	[thread overview]
Message-ID: <3ED17C39.5040107@hq.ntsp.nec.co.jp> (raw)
In-Reply-To: 3ED175DF.6050503@hq.ntsp.nec.co.jp


  readSet = socketSet;
  if ( select( highestSocketValue + 1, &readSet, NULL, NULL, NULL ) > -1 )
  {
      .
      .
      .
      
      if ( FD_ISSET( mySocket, &readSet ) )
      {
        size = recv( mySocket, message, MAX_MSG_SIZE - 1, 0 );
        if ( size == 0 )
        {
           close( mySocket );
           FD_CLR( mySocket, &socketSet );
        }
        else
        {
           printf( "%s\n", message );
        }
      }
      
      .
      .
      .
      
  }    
  


  reply	other threads:[~2003-05-26  2:30 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-05-26  2:03 question on socket connection Lejanson C. Go
2003-05-26  2:30 ` ronkhu [this message]
2003-05-26  5:57 ` Glynn Clements
  -- strict thread matches above, loose matches on Subject: below --
2003-05-26  6:56 Ranga Reddy M - CTD ,Chennai.
2003-05-26  7:33 ` ronkhu
2003-05-26  8:02 Ranga Reddy M - CTD ,Chennai.
2003-05-26  8:27 ` Glynn Clements
2003-05-26  8:43 ` ronkhu
2003-05-26  8:44 Ranga Reddy M - CTD ,Chennai.
2003-05-26 10:05 ` John T. Williams

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=3ED17C39.5040107@hq.ntsp.nec.co.jp \
    --to=ronkhu@ntsp.nec.co.jp \
    --cc=linux-c-programming@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).