On Mon, 16 Dec 2013 22:21:14 -0800 Glyph <[email protected]> wrote: > > This is another case where pushing more convenience functionality into a > primitive just means more re-implementation of that convenience functionality > in different primitive implementations. All of this reconnecting logic can > be higher-level, defined in terms of wrappers around protocols, without any > additional complexity on the part of the caller.
I don't understand how reconnection can be a "wrapper around protocols". To reconnect you have to interact with a given transport. Worse, you must *decide* whether to reconnect or not (because a normal connection close should usually not lead you to reconnect). So it *is* transport-specific already. Actually, the general pattern may be to call self.transport.reconnect() from the protocol's connection_lost(). Regards Antoine.
