client_connection.py 文件源码

python
阅读 21 收藏 0 点赞 0 评论 0

项目:parsec-cloud 作者: Scille 项目源码 文件源码
def anonymous_websocket_route_factory(execute_cmd, base_dispatcher):

    async def on_connection(request):
        ws = web.WebSocketResponse()
        await ws.prepare(request)
        context = WebsocketClientConnectionContext(ws)
        client_dispatcher = client_dispatcher_factory(context)
        dispatcher = ComposedDispatcher([base_dispatcher, client_dispatcher])
        context.logger.info('Connection started (anonymous connection)')
        await _on_connection_main_loop(execute_cmd, context, dispatcher)
        return ws

    return on_connection
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号