[Twisted-Python] Transplating a request's transport (SockJS)
Laurens Van Houtven
_ at lvh.cc
Sun Oct 28 16:40:31 EDT 2012
On Sun, Oct 28, 2012 at 9:17 PM, Glyph <glyph at twistedmatrix.com> wrote:
> Since there's no supported way to transplant a transport (see <
> http://tm.tl/3204>)... yes.
> But, even if you were going to rely on undefined behavior and private
> APIs, I don't see anything in your code sample that changes anything on the
> *transport* to point at your new protocol. So I don't see why you would
> think that it would start calling methods on it :).
For some reason I thought IProtocol.makeConnection did that; I guess it's
because the implementation in Protocol sets the `transport` attribute (I
thought it was the other way around).
I've set transport.protocol = myNewProtocol and now there's one extra
passing acceptance test.
I'm slowly beginning to wonder if it wouldn't be easier to write it from
scratch using t.w.websockets from the get-go...
> Twisted-Python mailing list
> Twisted-Python at twistedmatrix.com
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Twisted-Python