Search code examples
pythonwebsocketautobahnautobahnws

Autobahn websocket


I'm evaluating and building a simple websocket server with autobahn websocket

Has anyone used subclass WrappingWebSocketServerProtocol, are there any examples of using this implementation? What is the benefit over the WebSocketServerProtocol and what submethods to override/implement

thank you


Solution

  • AutobahnPython allows you to run any application protocol that builds on a stream-based transport protocol (like Telnet, IMAP, VNC, ..) over WebSocket. For this kind of wrapping, you would use the WrappingWebSocketServerProtocol and related classes.

    AutobahnPython also allows to run WebSocket over any stream-based transport protocol/facility (like Unix domain sockets, pipes, serial, ..). For this you would use Endpoints: https://github.com/tavendo/AutobahnPython/tree/master/examples/twisted/websocket/echo_endpoints

    Now, both of above are covering special use cases, and if you want to do a "normal" WebSocket app, you would just use the WebSocketServerProtocol and related classes.