Google and Python

Hendrik van Rooyen mail at
Wed Sep 26 08:59:17 CEST 2007

"Paul Rubin" <http://lid> wrote:

> "Hendrik van Rooyen" <> writes:
> > What is the advantage of passing the open file rather than just the
> > fully qualified file name and having the other process open the
> > file itself?
> The idea is that the application is a web server.  The socket listener
> accepts connections and hands them off to other processes.  That is,
> the file descriptors are handles on network connections that were
> opened by the remote client, not disk files that can be opened
> locally.

Ok got it - so instead of starting a thread, as is current practice, you fork
a process (possibly on another machine) and "hand over" the client.
Can't you do this by passing the client's IP addy and the negotiated socket
on the clients machine?

Or is this where the heavy lifting comes in? - "spoofing" the original local IP
addy on the new server? - seems you would have to route to a local machine
based not on IP addy only, but on (IP,socket) tuples.  - This might work if
you have only one entry point to the local LAN, but would be harder to do
if there are two points of entry, and packets could hit from outside on either..

Might be easier to redirect the browser than to try to do this.

- Hendrik

More information about the Python-list mailing list