(window.webpackJsonp=window.webpackJsonp||[]).push([[114],{585:function(t,e,r){"use strict";r.r(e);var a=r(21),s=Object(a.a)({},(function(){var t=this,e=t.$createElement,r=t._self._c||e;return r("ContentSlotsDistributor",{attrs:{"slot-key":t.$parent.slotKey}},[r("h1",{attrs:{id:"nonebot-drivers-aiohttp-模块"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#nonebot-drivers-aiohttp-模块"}},[t._v("#")]),t._v(" NoneBot.drivers.aiohttp 模块")]),t._v(" "),r("h2",{attrs:{id:"aiohttp-驱动适配"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#aiohttp-驱动适配"}},[t._v("#")]),t._v(" AIOHTTP 驱动适配")]),t._v(" "),r("p",[t._v("本驱动仅支持客户端连接")]),t._v(" "),r("h2",{attrs:{id:"class-driver"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#class-driver"}},[t._v("#")]),t._v(" "),r("em",[t._v("class")]),t._v(" "),r("code",[t._v("Driver")])]),t._v(" "),r("p",[t._v("基类："),r("router-link",{attrs:{to:"./#nonebot.drivers.ForwardDriver"}},[r("code",[t._v("nonebot.drivers.ForwardDriver")])])],1),t._v(" "),r("p",[t._v("AIOHTTP 驱动框架")]),t._v(" "),r("h3",{attrs:{id:"property-type"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#property-type"}},[t._v("#")]),t._v(" "),r("em",[t._v("property")]),t._v(" "),r("code",[t._v("type")])]),t._v(" "),r("p",[t._v("驱动名称: "),r("code",[t._v("aiohttp")])]),t._v(" "),r("h3",{attrs:{id:"property-logger"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#property-logger"}},[t._v("#")]),t._v(" "),r("em",[t._v("property")]),t._v(" "),r("code",[t._v("logger")])]),t._v(" "),r("p",[t._v("aiohttp driver 使用的 logger")]),t._v(" "),r("h3",{attrs:{id:"on-startup-func"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#on-startup-func"}},[t._v("#")]),t._v(" "),r("code",[t._v("on_startup(func)")])]),t._v(" "),r("ul",[r("li",[r("p",[r("strong",[t._v("说明")])]),t._v(" "),r("p",[t._v("注册一个启动时执行的函数")])]),t._v(" "),r("li",[r("p",[r("strong",[t._v("参数")])]),t._v(" "),r("ul",[r("li",[r("code",[t._v("func: Callable[[], Awaitable[None]]")])])])])]),t._v(" "),r("h3",{attrs:{id:"on-shutdown-func"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#on-shutdown-func"}},[t._v("#")]),t._v(" "),r("code",[t._v("on_shutdown(func)")])]),t._v(" "),r("ul",[r("li",[r("p",[r("strong",[t._v("说明")])]),t._v(" "),r("p",[t._v("注册一个停止时执行的函数")])]),t._v(" "),r("li",[r("p",[r("strong",[t._v("参数")])]),t._v(" "),r("ul",[r("li",[r("code",[t._v("func: Callable[[], Awaitable[None]]")])])])])]),t._v(" "),r("h3",{attrs:{id:"setup-http-polling-setup"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#setup-http-polling-setup"}},[t._v("#")]),t._v(" "),r("code",[t._v("setup_http_polling(setup)")])]),t._v(" "),r("ul",[r("li",[r("p",[r("strong",[t._v("说明")])]),t._v(" "),r("p",[t._v("注册一个 HTTP 轮询连接，如果传入一个函数，则该函数会在每次连接时被调用")])]),t._v(" "),r("li",[r("p",[r("strong",[t._v("参数")])]),t._v(" "),r("ul",[r("li",[r("code",[t._v("setup: Union[HTTPPollingSetup, Callable[[], Awaitable[HTTPPollingSetup]]]")])])])])]),t._v(" "),r("h3",{attrs:{id:"setup-websocket-setup"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#setup-websocket-setup"}},[t._v("#")]),t._v(" "),r("code",[t._v("setup_websocket(setup)")])]),t._v(" "),r("ul",[r("li",[r("p",[r("strong",[t._v("说明")])]),t._v(" "),r("p",[t._v("注册一个 WebSocket 连接，如果传入一个函数，则该函数会在每次重连时被调用")])]),t._v(" "),r("li",[r("p",[r("strong",[t._v("参数")])]),t._v(" "),r("ul",[r("li",[r("code",[t._v("setup: Union[WebSocketSetup, Callable[[], Awaitable[WebSocketSetup]]]")])])])])]),t._v(" "),r("h3",{attrs:{id:"run-args-kwargs"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#run-args-kwargs"}},[t._v("#")]),t._v(" "),r("code",[t._v("run(*args, **kwargs)")])]),t._v(" "),r("p",[t._v("启动 aiohttp driver")]),t._v(" "),r("h2",{attrs:{id:"class-websocket"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#class-websocket"}},[t._v("#")]),t._v(" "),r("em",[t._v("class")]),t._v(" "),r("code",[t._v("WebSocket")])]),t._v(" "),r("p",[t._v("基类："),r("router-link",{attrs:{to:"./#nonebot.drivers.WebSocket"}},[r("code",[t._v("nonebot.drivers.WebSocket")])])],1)])}),[],!1,null,null,null);e.default=s.exports}}]);