[Twisted-Python] Protocol for socket.io

Glyph glyph at twistedmatrix.com
Sun Jan 26 02:46:44 MST 2014


On Jan 25, 2014, at 12:21 PM, Dustin J. Mitchell <dustin at v.igoro.us> wrote:

> As I understand it, socket.io is a browser-side library that uses any
> of a number of technologies, depending on its environment, to
> communicate with the server.  SSE, Websockets, and long polling are
> all on the list.  Last I looked, though, I didn't see any support for
> the negotiation of which of these protocols to use with a Twisted
> server.
> 
> If that's changed, I'd certainly be interested!

It would be great if someone built a package to do this (more interop is always better), but I think interest has generally fizzled on Socket.IO implementations in the past because SockJS does pretty much exactly the same thing, and as Laurens said, our friends over at Desert Bus for Hope maintain great Twisted support for it <https://github.com/DesertBus/sockjs-twisted> <https://pypi.python.org/pypi/txsockjs>.

It even has endpoints support, including a string parser!  <https://github.com/DesertBus/sockjs-twisted#endpoints>.

Socket.IO is just a negotiation protocol for deciding whether to use websockets though.  If you started with Autobahn I can't imagine it would be more than a day or two of work to implement.

-glyph
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://twistedmatrix.com/pipermail/twisted-python/attachments/20140126/b6fd5d78/attachment-0001.html>


More information about the Twisted-Python mailing list