diff options
author | 2018-02-18 11:21:57 +0000 | |
---|---|---|
committer | 2018-02-18 11:21:57 +0000 | |
commit | 218db5222983b2b102b5f32a77845468cdaf9dab (patch) | |
tree | b9eb2601f90ddcb9c1226f0aa8493aa34c7111be /pysite/websockets.py | |
parent | Go back to using wss:// for the WS test (diff) |
Rename "Websocket" to "WS" to avoid confusion with the gevents-websocket WebSocket class
Diffstat (limited to '')
-rw-r--r-- | pysite/websockets.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/pysite/websockets.py b/pysite/websockets.py index f82217ef..fa1fd0eb 100644 --- a/pysite/websockets.py +++ b/pysite/websockets.py @@ -4,7 +4,7 @@ from flask import Blueprint from geventwebsocket.websocket import WebSocket -class Websocket: +class WS: """ Base class for representing a Websocket. @@ -13,7 +13,7 @@ class Websocket: If you need access to the database, you can mix-in DBMixin, just like any view class: - >>> class DBWebsocket(Websocket, DBMixin): + >>> class DBWebsocket(WS, DBMixin): ... name = "db_websocket" ... path = "/db_websocket" # This will be prefixed with "/ws" by the blueprint ... table = "ws" @@ -61,7 +61,7 @@ class Websocket: self.socket.send(message, binary=binary) @classmethod - def setup(cls: "type(Websocket)", manager: "pysite.route_manager.RouteManager", blueprint: Blueprint): + def setup(cls: "type(WS)", manager: "pysite.route_manager.RouteManager", blueprint: Blueprint): """ Set up the websocket object, calling `setup()` on any superclasses as necessary (for example, on the DB mixin). @@ -78,7 +78,7 @@ class Websocket: def handle(socket: WebSocket): """ - Wrap the current Websocket class, dispatching events to it as necessary. We're using gevent, so there's + Wrap the current WS class, dispatching events to it as necessary. We're using gevent, so there's no need to worry about blocking here. """ |