
Jp Calderone wrote:
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 business.
Uh, no. This only worked because of a bad design decision in tcp.py - it will not work in CVS or in any future release. The real solution then is to fix the pb connection APIs so they use pluggable transports. Glyph tends to do this using URLs, e.g. "pb-tcp://localhost:7777/bar" or "pb-unix://tmp/.socket" or "pb-tls://localhost:8888/baz". There should hopefully be some solution in CVS soon, given that we need this functionality to run twistedmatrix.com.