Can somebody give me an advice about what to learn?

Roy Smith roy at panix.com
Sun Sep 30 18:14:29 EDT 2012


In article <mailman.1677.1349019431.27098.python-list at python.org>,
 Chris Angelico <rosuav at gmail.com> wrote:

> you can't, for instance, retain a "socket connection object" across 
> that sort of reload.

Yeah, that's a problem.  There's nothing fundamental about a TCP 
connection endpoint which precludes it being serialized and passed 
around.  The amount of state involved is pretty small.  Unless I've 
forgotten something, 2 IP addresses, 2 port numbers, a few bits worth of 
TCP protocol state, and, for open connections, 2 sequence numbers.  
Maybe a couple of timers, but I don't think they're strictly necessary.  
The problem is, most of that state is private to the kernel.

On the other hand, you could do what "screen" does, and spawn a process 
per connection to hold the connection open :-)



More information about the Python-list mailing list