[Twisted-Python] Twisted Endpoints and WebSocket / Autobahn

Tobias Oberstein tobias.oberstein at tavendo.de
Thu Dec 12 01:29:48 MST 2013


Hi,

I am working on Twisted Endpoint support in Autobahn https://github.com/tavendo/AutobahnPython.

So far, I made Autobahn able to talk WebSocket _over_ arbitrary Twisted Endpoints, e.g. WebSocket over Unix domain sockets works. This is already quite nifty.

Is there anything like Twisted Endpoints for Processes and/or Serial? Like:

endpoint = serverFromString(reactor,"process:program=/usr/local/bin/myprogram")

or

endpoint = serverFromString(reactor,"serial:port=/dev/tty1:baudrate=115000")

That would allow to talk WebSocket over stdin/stdout to a program or a serial conneced device. Both can be useful in certain situations.

I'd also like to add the other: creating an Twisted Endpoint _from_ an Autobahn server/client to be able to talk any (stream) protocol _over_ WebSocket (like SSH or VNC over WebSocket).

endpoint = serverFromString(reactor,"websocket:tcp:80:url=ws://myhostname.com/somepath")

I guess I need to provide an implementation of
http://twistedmatrix.com/documents/current/api/twisted.internet.interfaces.ITransport.html

What else? Is there some docs or recipe?

Thanks!
/Tobias




More information about the Twisted-Python mailing list