How to use autobahn.twisted with ws://echo.websocket.org?

139 views Asked by At

I'm trying to get started with autobahn for websockets. I've modified the code here: https://github.com/crossbario/autobahn-python/blob/master/examples/twisted/websocket/echo/client.py

I replaced

factory = WebSocketClientFactory(u"ws://127.0.0.1:9000")

with

factory = WebSocketClientFactory(u"ws://echo.websocket.org")

My output is:

2016-12-18 20:54:14-0500 [-] Log opened.
2016-12-18 20:54:14-0500 [-] Starting factory <autobahn.twisted.websocket.WebSocketClientFactory object at 0x104a37f10>
2016-12-18 20:54:14-0500 [-] Stopping factory <autobahn.twisted.websocket.WebSocketClientFactory object at 0x104a37f10>


^C2016-12-18 20:54:17-0500 [-] Received SIGINT, shutting down.
2016-12-18 20:54:17-0500 [-] Main loop terminated.

See (http://www.websocket.org/echo.html) I imagine this is quite basic, and probably stems from a fundamental misunderstanding of websockets, but nonetheless, any advice?

0

There are 0 answers