websocket_server.py 文件源码

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

项目:bigchaindb 作者: bigchaindb 项目源码 文件源码
def init_app(event_source, *, loop=None):
    """Init the application server.

    Return:
        An aiohttp application.
    """

    dispatcher = Dispatcher(event_source)

    # Schedule the dispatcher
    loop.create_task(dispatcher.publish())

    app = web.Application(loop=loop)
    app['dispatcher'] = dispatcher
    app.router.add_get(EVENTS_ENDPOINT, websocket_handler)
    return app
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号