[Twisted-Python] Some thoughts hacking with AMP (was: something about multiplexing and accessing protocols)

2013-11-22 Thread Laurens Van Houtven
Hi, Some thoughts while hacking: - The argument having access to the responder locator and then eventually it going to a responder function is kind of useless, usually. The responder function already has a reference to the locator, usually called "self" :) - The locator object can be shared betwe

Re: [Twisted-Python] Some thoughts hacking with AMP (was: something about multiplexing and accessing protocols)

2013-11-22 Thread Glyph
On Nov 22, 2013, at 4:10 AM, Laurens Van Houtven <_...@lvh.io> wrote: > Also, I do really really want the protocol and not the transport. This is > because I want to pass a reference to the protocol around so that later I can > call callRemote on it. That I can also get the transport is mostly

Re: [Twisted-Python] Do Viewables absolutely have to be return'ed by Avatars?

2013-11-22 Thread Daniel Sank
> Question: Is there a way to distribute un-asked for references to > Viewables that properly get the perspective argument in their view_* > methods? I think this is a pretty reasonable question but nobody's biting. Did I do something wrong in the way I asked?

Re: [Twisted-Python] Do Viewables absolutely have to be return'ed by Avatars?

2013-11-22 Thread Glyph
On Nov 20, 2013, at 3:54 PM, Daniel Sank wrote: > From some experimentation I find that the only way to make a Viewable > get a meaningful perspective argument when executing view_* methods is > to make sure that the references to that Viewable are given to clients > as return values from perspe

Re: [Twisted-Python] Do Viewables absolutely have to be return'ed by Avatars?

2013-11-22 Thread Daniel Sank
Thanks much for the reply. > So, this strikes me as incredibly subtle, and likely a bug Should I file a ticket? > One way to fix this is to manually construct a ViewPoint rather than a > Viewable and pass that to the client. If someone would be willing to supply a very simple demonstration of

Re: [Twisted-Python] Do Viewables absolutely have to be return'ed by Avatars?

2013-11-22 Thread Glyph
On Nov 22, 2013, at 12:01 PM, Daniel Sank wrote: > Thanks much for the reply. > >> So, this strikes me as incredibly subtle, and likely a bug > > Should I file a ticket? Absolutely. >> One way to fix this is to manually construct a ViewPoint rather than a >> Viewable and pass that to the cl

Re: [Twisted-Python] Do Viewables absolutely have to be return'ed by Avatars?

2013-11-22 Thread Daniel Sank
>>> One way to fix this is to manually construct a ViewPoint rather than a >>> Viewable and pass that to the client. >> >> If someone would be willing to supply a very simple demonstration of >> this I would appreciate it very much. > > It's a very simple change to your server; your client remains

Re: [Twisted-Python] txThings - simple library for CoAP protocol

2013-11-22 Thread Ron Segal
Tobias Oberstein tavendo.de> writes: > > > > E.g., as a start, we could have a dedicated page on the Twistedmatrix > > > Web site "Twisted for Things" for intro and collecting links, articles > > > etc > > > > Fun fact: the very first class in the very first thing that would eventually > > beco