From owner-freebsd-hackers@FreeBSD.ORG Fri Jul 25 08:49:06 2003 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 031BA37B401 for ; Fri, 25 Jul 2003 08:49:06 -0700 (PDT) Received: from hermes.aueb.gr (hermes.aueb.gr [195.251.255.142]) by mx1.FreeBSD.org (Postfix) with ESMTP id 7F1CF43FA3 for ; Fri, 25 Jul 2003 08:49:04 -0700 (PDT) (envelope-from dds@aueb.gr) Received: from aueb.gr (hermes.aueb.gr [195.251.255.142]) by hermes.aueb.gr (8.12.9/8.12.9) with ESMTP id h6PFmjoj026938; Fri, 25 Jul 2003 18:48:45 +0300 Message-ID: <3F21513D.52897D08@aueb.gr> Date: Fri, 25 Jul 2003 18:48:13 +0300 From: Diomidis Spinellis Organization: Athens University of Ecomomics and Business X-Mailer: Mozilla 4.78 [en] (Windows NT 5.0; U) X-Accept-Language: en,el,de MIME-Version: 1.0 To: Kirk Strauser References: <3F1F96A5.A7D2D221@aueb.gr> <873cgvh9oe.fsf@pooh.honeypot.net> <3F20C8C9.C760FC9A@aueb.gr> <87y8ymepmq.fsf@pooh.honeypot.net> Content-Type: text/plain; charset=iso-8859-7 Content-Transfer-Encoding: 7bit cc: freebsd-hackers@freebsd.org Subject: Re: Network pipes X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 25 Jul 2003 15:49:06 -0000 Kirk Strauser wrote: > At 2003-07-25T06:06:01Z, Diomidis Spinellis writes: > > You still have the overhead of two nc instances copying data and context > > switching. > Forgive my ignorance, but is that significantly higher than two /bin/sh > instances copying data and context switching? When the shell connects two local processes with a pipe it just redirects the output of the one and the input of the other to the two ends of a pipe(2) IPC abstraction and leaves them to communicate with each other simply wait(2)ing until they finish. The shell does not shuffle the data between the two processes. The same can also be done when connecting a local process with a remote process through a socket(2); there is no need for an intermediary, and this is what I have implemented. Diomidis - http://www.spinellis.gr