proto and type args
This commit is contained in:
parent
7fe211d134
commit
073ffdd049
1 changed files with 2 additions and 2 deletions
|
@ -153,6 +153,6 @@ async def resolve_host(url: str, port: int, proto: str) -> str:
|
|||
loop = asyncio.get_running_loop()
|
||||
return (await loop.getaddrinfo(
|
||||
url, port,
|
||||
proto=socket.IPPROTO_TCP if proto == 'tcp' else socket.SOCK_DGRAM,
|
||||
type=socket.SOCK_STREAM
|
||||
proto=socket.IPPROTO_TCP if proto == 'tcp' else socket.IPPROTO_UDP,
|
||||
type=socket.SOCK_STREAM if proto == 'tcp' else socket.SOCK_DGRAM
|
||||
))[0][4][0]
|
||||
|
|
Loading…
Reference in a new issue