This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author pitrou
Recipients Elizacat, asvetlov, gc, gvanrossum, pitrou, vstinner, yselivanov
Date 2015-04-28.18:26:09
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1430245569.41.0.173396108911.issue23749@psf.upfronthosting.co.za>
In-reply-to
Content
> As for replacing the protocol but keeping the transport, what would
> be the semantics of that?

The protocol is not really replaced, it's wrapped.

Before:

  SocketTransport <- UserProtocol

After:

  SocketTransport <- (asyncio.sslproto.SSLProtocol
     <- asyncio.sslproto._SSLProtocolTransport) <- UserProtocol

That way, the same SocketTransport (but it could be something else, e.g. a pipe transport) is always bound to the event loop; we simply insert a processing layer in the chain between the original transport and the final protocol.  There are two distinct objects so that the SocketTransport sees a protocol and the UserProtocol sees a transport; but those two objects work hand in hand.
History
Date User Action Args
2015-04-28 18:26:09pitrousetrecipients: + pitrou, gvanrossum, vstinner, asvetlov, yselivanov, Elizacat, gc
2015-04-28 18:26:09pitrousetmessageid: <1430245569.41.0.173396108911.issue23749@psf.upfronthosting.co.za>
2015-04-28 18:26:09pitroulinkissue23749 messages
2015-04-28 18:26:09pitroucreate