[Python-ideas] Tulip / PEP 3156 - subprocess events

Greg Ewing greg.ewing at canterbury.ac.nz
Sat Jan 19 05:16:17 CET 2013


Antoine Pitrou wrote:
> Except that you probably want the protocol to outlive the transport if
> you want to deal with reconnections or connection failures, and
> therefore:
>> TCPClient(HTTPProtocol(), ("some.where.net", 80))

I don't see how to generalise that to more complicated
protocol stacks, though.
For dealing with re-connections, it seems like both the
protocol *and* the transport need to outlive the connection
failure, and the transport needs a reconnect() method that
is called by a protocol that can deal with that situation.
Reconnection can then propagate along the whole chain.
-- 
Greg


More information about the Python-ideas mailing list

AltStyle によって変換されたページ (->オリジナル) /