1.2 KiB
1.2 KiB
Programming with WebSocekt
Note
Content will be added to this section in the near future. For now,
please take a look at the WebSocket Examples <websocket_examples> and the
WebSocket Reference <websocket_reference>.
Upgrading from Autobahn < 0.7.0
Starting with release 0.7.0, now supports both Twisted and asyncio as the underlying network library. This required changing module naming, e.g.
< 0.7.0:
from autobahn.websocket import WebSocketServerProtocol
>= 0.7.0:
from autobahn.twisted.websocket import WebSocketServerProtocol
or
from autobahn.asyncio.websocket import WebSocketServerProtocol
Two more small changes (also see the interface definition now available):
WebSocketProtocol.sendMessage: renaming of parameterbinarytoisBinary(for consistency with onMessage)ConnectionRequestno longer providespeerstr, but onlypeer, and the latter is a plain, descriptive string (this was needed since we now support both Twisted and asyncio, and also non-TCP transports)