summaryrefslogtreecommitdiff
path: root/docs/library/asyncio.rst
diff options
context:
space:
mode:
Diffstat (limited to 'docs/library/asyncio.rst')
-rw-r--r--docs/library/asyncio.rst8
1 files changed, 6 insertions, 2 deletions
diff --git a/docs/library/asyncio.rst b/docs/library/asyncio.rst
index 9a2c14e7e..b57f1ee04 100644
--- a/docs/library/asyncio.rst
+++ b/docs/library/asyncio.rst
@@ -201,10 +201,12 @@ class Lock
TCP stream connections
----------------------
-.. function:: open_connection(host, port)
+.. function:: open_connection(host, port, ssl=None)
Open a TCP connection to the given *host* and *port*. The *host* address will be
resolved using `socket.getaddrinfo`, which is currently a blocking call.
+ If *ssl* is a `ssl.SSLContext` object, this context is used to create the transport;
+ if *ssl* is ``True``, a default context is used.
Returns a pair of streams: a reader and a writer stream.
Will raise a socket-specific ``OSError`` if the host could not be resolved or if
@@ -212,12 +214,14 @@ TCP stream connections
This is a coroutine.
-.. function:: start_server(callback, host, port, backlog=5)
+.. function:: start_server(callback, host, port, backlog=5, ssl=None)
Start a TCP server on the given *host* and *port*. The *callback* will be
called with incoming, accepted connections, and be passed 2 arguments: reader
and writer streams for the connection.
+ If *ssl* is a `ssl.SSLContext` object, this context is used to create the transport.
+
Returns a `Server` object.
This is a coroutine.