async def create_websocket_server ( sock , filter = None ) : # pylint: disable=W0622 ws = Websocket ( ) await ws . start_server ( sock , filter = filter ) return ws
python how to implement websocket
A more low - level form of open_websocket_server . You are responsible for closing this websocket .
async def create_websocket_server(sock, filter=None):  # pylint: disable=W0622
    """
    A more low-level form of open_websocket_server.
    You are responsible for closing this websocket.
    """
    ws = Websocket()
    await ws.start_server(sock, filter=filter)
    return ws