[Twisted-Python] tor hidden service endpoint parser returns a deferred

Glyph glyph at twistedmatrix.com
Tue May 6 15:25:17 MDT 2014


On May 6, 2014, at 4:38 AM, David Stainton <dstainton415 at gmail.com> wrote:

> However I was thinking that the "only_tor" mode for tahoe (mentioned
> here https://tahoe-lafs.org/trac/tahoe-lafs/ticket/517#comment:15 )
> could be implemented in tahoe... it could filter endpoint descriptors
> by calling clientFromString or serverFromString and then checking the
> object type.... or is this a terrible way to do it? I'm not sure. The
> thing is... tahoe wouldn't normally
> know anything about endpoints because it uses Foolscap which could use
> endpoints (it does in my branch
> https://github.com/david415/foolscap/tree/endpoint_descriptors_server2).

That sounds pretty ugly.  If you want a specific string parser that only calls your own one specific endpoint type, perhaps don't bother querying for plugins at all, just call your own directly?

-glyph

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://twistedmatrix.com/pipermail/twisted-python/attachments/20140506/b2ffe288/attachment.html>


More information about the Twisted-Python mailing list