module documentation
Websocket (rfc6455) client and server support.
For websocket servers, place a WebSocketResource
into your Twisted Web resource hierarchy.
For websocket clients, create a new endpoint via WebSocketClientEndpoint.new
with the WebSocket server URL and then, on the newly created endpoint, call WebSocketClientEndpoint.connect
.
Both client-side and server-side application code must conform to WebSocketProtocol
.
Note | |
To use this module, you must install Twisted's websocket extra, i.e. pip install twisted[websocket]. |
Class |
|
A WebSocketClientEndpoint describes an URL to connect to and a way of connecting to that URL, that can connect a WebSocketClientFactory to that URL. |
Class |
|
A WebSocketClientFactory is a factory for a particular kind of WebSocketProtocol that implements client-side websocket listeners via WebSocketClientEndpoint . |
Class |
|
An object that conforms to WebSocketProtocol can receive all the events from a websocket connection. |
Class |
|
A WebSocketResource is a Resource that presents a websocket listener. You can install it into any twisted web server resource hierarchy. |
Class |
|
A WebSocketServerFactory is a factory for a particular kind of WebSocketProtocol that implements server-side websocket listeners via WebSocketResource . |
Class |
|
The transport that can send websocket messages. |
Exception |
|
A websocket connection was rejected by an HTTP response. |