*BSD News Article 18979


Return to BSD News archive

Path: sserve!newshost.anu.edu.au!munnari.oz.au!news.Hawaii.Edu!ames!elroy.jpl.nasa.gov!usc!howland.reston.ans.net!math.ohio-state.edu!uwm.edu!ogicse!flop.ENGR.ORST.EDU!gaia.ucs.orst.edu!umn.edu!lynx.unm.edu!carina.unm.edu!hsteve
From: hsteve@carina.unm.edu
Newsgroups: comp.unix.bsd
Subject: Help on nonblocking accept call
Message-ID: <236jfrINNb5@lynx.unm.edu>
Date: 28 Jul 93 19:19:23 GMT
Article-I.D.: lynx.236jfrINNb5
Organization: University of New Mexico, Albuquerque
Lines: 20
NNTP-Posting-Host: carina.unm.edu

I don't know if this is the right News group to ask for help, but I'll ask 
anyway.  I have a routine (the server) which sits around waiting to accept
connection from the client.  This is done by staying in an infinite loop and
forks as soon as there's an accept.  But inside this loop, I also need to
check another socket to see if there's anything on the socket to read.  Since,
accept will block until the client connect, I'm thinking about using select
to see if the client is ready to connect then I accept.  Otherwise I will
check to see if there's anything on the other socket.

P.S.  Please e-mail to hsteve@carina.unm.edu

Thanks



-- 
    _---_     Steve  
   / o o \    hsteve@hydra.unm.edu, hsteve@carina.unm.edu
  | \___/ |   
              Just say NO to VMS!!