From owner-freebsd-questions Wed Oct 23 15:44:48 2002 Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id CA31937B401 for ; Wed, 23 Oct 2002 15:44:47 -0700 (PDT) Received: from web21108.mail.yahoo.com (web21108.mail.yahoo.com [216.136.227.110]) by mx1.FreeBSD.org (Postfix) with SMTP id 9E5FA43E42 for ; Wed, 23 Oct 2002 15:44:47 -0700 (PDT) (envelope-from geekvinod@yahoo.com) Message-ID: <20021023224447.33671.qmail@web21108.mail.yahoo.com> Received: from [152.15.26.29] by web21108.mail.yahoo.com via HTTP; Wed, 23 Oct 2002 15:44:47 PDT Date: Wed, 23 Oct 2002 15:44:47 -0700 (PDT) From: Vinod Subject: help with socket programming To: freebsd-questions@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG I needed some help with unix socket programming.i have the richard steven's book but couldnt solve this. i need a socket descriptor handle to process all my clients which fork out.but the handle i was using new_fd(see below) turned out to be the same for all. listen(..,..) for(;;) { int new_fd=accept(sockfd,....,...); ... .... } Shouldnt the new_fd be distinct everytime a new client connects? Thanks in advance, Vinod __________________________________________________ Do you Yahoo!? Y! Web Hosting - Let the expert host your web site http://webhosting.yahoo.com/ To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message