diff --git a/README.md b/README.md index ad152a1..f52543b 100644 --- a/README.md +++ b/README.md @@ -63,6 +63,7 @@ Install this via pip (or your favourite package manager): addr_infos = await loop.getaddrinfo("example.org", 80) socket = await start_connection(addr_infos) +socket = await start_connection(addr_infos, local_addr_infos=local_addr_infos, happy_eyeballs_delay=0.2) transport, protocol = await loop.create_connection( MyProtocol, sock=socket, ...) diff --git a/docs/usage.md b/docs/usage.md index 7f50178..7fbd3c1 100644 --- a/docs/usage.md +++ b/docs/usage.md @@ -8,6 +8,12 @@ Start by importing it: ```python import aiohappyeyeballs -``` -TODO: Document usage +addr_infos = await loop.getaddrinfo("example.org", 80) + +socket = await aiohappyeyeballs.start_connection(addr_infos) +socket = await aiohappyeyeballs.start_connection(addr_infos, local_addr_infos=local_addr_infos, happy_eyeballs_delay=0.2) + +transport, protocol = await loop.create_connection( + MyProtocol, sock=socket, ...) +```