[Twisted-Python] PB over unix socket ... how?

Jp Calderone exarkun at meson.dyndns.org
Sun Aug 11 12:31:26 EDT 2002

On Sat, Aug 10, 2002 at 02:23:01AM -0400, Steve Waterbury wrote:
> twisted gurus ... help!
> I want to use PB down in the guts of my application, but only later on 
> will I actually be using the pb protocol over the network, so in the 
> meantime I'd like to play it safe and have PB talk to other components 
> over unix domain sockets.  
> I know from wandering around in the internet module that there's lots 
> of support for unix sockets and even an IReactorUNIX, but it's late and 
> I'm a little dizzy and I figured someone could probably point me in the 
> right direction with about 5 lines anyway ... if there's an example, I 
> musta missed it ... 8^P  

Just take the pb examples and change the "listenTCP" call and change the
port argument to a string.  The string will be the name of unix socket in
the filesystem.  Change your connectTCP calls similarly and you should be in


A sad spectacle.  If they be inhabited, what a scope for misery 
and folly.  If they be not inhabited, what a waste of space.
                -- Thomas Carlyle, looking at the stars
 12:28pm up 82 days, 13:16, 6 users, load average: 0.01, 0.02, 0.00
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 237 bytes
Desc: not available
Url : http://twistedmatrix.com/pipermail/twisted-python/attachments/20020811/0a528f2c/attachment.pgp 

More information about the Twisted-Python mailing list