home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!digex.com!intercon!udel!gatech!concert!borg.cs.unc.edu!not-for-mail
- From: panvalka@cs.unc.edu (Anay Panvalkar)
- Newsgroups: comp.unix.programmer
- Subject: Re: client/server question.....
- Date: 27 Jan 1993 12:04:05 -0500
- Organization: The University of North Carolina at Chapel Hill
- Lines: 32
- Message-ID: <1k6fa5INN1m6@opsin.cs.unc.edu>
- References: <1993Jan26.221617.53627@slate.mines.colorado.edu>
- NNTP-Posting-Host: opsin.cs.unc.edu
-
- In article <1993Jan26.221617.53627@slate.mines.colorado.edu> iarit@slate.mines.colorado.edu (ARIT ISMAIL) writes:
-
- >I don't want to fork because the info should be generated on one
- >program, send to server and the server has to respond to every
- >program connected with the same info( if I fork, how can I transfer
- >that info to child?).
-
- One solution is open a temp. file and write your info to it.
- Then when you fork() the child will get its own copy of the
- parent's descriptors. But, if the child modifies this info,
- it will affect any later read or writes to it by the parent.
-
- > check_new_connection(); /* how can I check if there is any new
- > without waiting, as far as I know accept(..)
- > blocks you 'till you get some connection*/
-
- Well, read the man page for select(2)...
- Selecting true for reading on a socket descriptor upon which
- a listen(2) call has been performed indicates that a subse-
- quent accept(2) call on that descriptor will not block.
-
- >My problem is getting new connections without waiting.
- >I appreciate any help.
- >iarit@slate.mines.colorado.edu
-
- -Anay
-
- --
- ===============================================================================
- Anay S. Panvalkar
- Biomedical Engineering ****GO TARHEELS****
- University of North Carolina
-