mirror of
https://github.com/Rapptz/discord.py.git
synced 2026-11-20 13:29:03 +00:00
Rewrite gateway to use aiohttp instead of websockets
This commit is contained in:
1 parent
45cb231161
commit
b8154e365f
8 files changed
+97
-92
No files matched your search
@@ -111,6 +111,17 @@ class HTTPClient:
|
||||
if self.__session.closed:
|
||||
self.__session = aiohttp.ClientSession(connector=self.connector)
|
||||
|
||||
async def ws_connect(self, url):
|
||||
kwargs = {
|
||||
'proxy_auth': self.proxy_auth,
|
||||
'proxy': self.proxy,
|
||||
'max_msg_size': 0,
|
||||
'timeout': 30.0,
|
||||
'autoclose': False,
|
||||
}
|
||||
|
||||
return await self.__session.ws_connect(url, **kwargs)
|
||||
|
||||
async def request(self, route, *, files=None, **kwargs):
|
||||
bucket = route.bucket
|
||||
method = route.method
|
||||
|
||||
Reference in new issue
Block a user