Skip to content

Commit

Permalink
Docs on local_address wildcards (#147)
Browse files Browse the repository at this point in the history
  • Loading branch information
tomchristie authored Aug 11, 2020
1 parent d82896b commit bf88f29
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
6 changes: 5 additions & 1 deletion httpcore/_async/connection_pool.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,11 @@ class AsyncConnectionPool(AsyncHTTPTransport):
* **keepalive_expiry** - `Optional[float]` - The maximum time to allow
before closing a keep-alive connection.
* **http2** - `bool` - Enable HTTP/2 support.
* **local_address** - `Optional[str]` - Local address to connect from.
* **local_address** - `Optional[str]` - Local address to connect from. Can
also be used to connect using a particular address family. Using
`local_address="0.0.0.0"` will connect using an `AF_INET` address (IPv4),
while using `local_address="::"` will connect using an `AF_INET6` address
(IPv6).
"""

def __init__(
Expand Down
6 changes: 5 additions & 1 deletion httpcore/_sync/connection_pool.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,11 @@ class SyncConnectionPool(SyncHTTPTransport):
* **keepalive_expiry** - `Optional[float]` - The maximum time to allow
before closing a keep-alive connection.
* **http2** - `bool` - Enable HTTP/2 support.
* **local_address** - `Optional[str]` - Local address to connect from.
* **local_address** - `Optional[str]` - Local address to connect from. Can
also be used to connect using a particular address family. Using
`local_address="0.0.0.0"` will connect using an `AF_INET` address (IPv4),
while using `local_address="::"` will connect using an `AF_INET6` address
(IPv6).
"""

def __init__(
Expand Down

0 comments on commit bf88f29

Please sign in to comment.