From owner-freebsd-hackers Sat Jun 21 02:08:27 1997 Return-Path: Received: (from root@localhost) by hub.freebsd.org (8.8.5/8.8.5) id CAA20128 for hackers-outgoing; Sat, 21 Jun 1997 02:08:27 -0700 (PDT) Received: from csd.cs.technion.ac.il (csd.cs.technion.ac.il [132.68.32.8]) by hub.freebsd.org (8.8.5/8.8.5) with SMTP id CAA20119 for ; Sat, 21 Jun 1997 02:08:18 -0700 (PDT) Received: from localhost (nadav@localhost) by csd.cs.technion.ac.il (8.6.11/8.6.10) with SMTP id MAA10367; Sat, 21 Jun 1997 12:07:21 +0300 X-Authentication-Warning: csd.cs.technion.ac.il: nadav owned process doing -bs Date: Sat, 21 Jun 1997 12:07:21 +0300 (IDT) From: Nadav Eiron X-Sender: nadav@csd To: Adrian Chadd cc: freebsd-hackers@FreeBSD.ORG Subject: Re: socket redirector In-Reply-To: Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-hackers@FreeBSD.ORG X-Loop: FreeBSD.org Precedence: bulk On Fri, 20 Jun 1997, Adrian Chadd wrote: > Hey guys. > > I'm writing a quick socket redirector for something. Its run out of inetd, > and basically opens a socket somewhere and acts as a pipe between the two. > I'm using select(), and its working fine. The only problem I'm having is > that I don't know how to tell when the remote end closes the connection > down, so that I can just close everything down, and quit. > > Any ideas on how I'd do this? Why not just use plug-gw from the fwtk? From your description it sounds like just the thing you need. > > Thanks, > > -- > Adrian Chadd | "Unix doesn't stop you from doing > | stupid things because that would > | stop you from doing clever things" > > > Nadav