Commit 3efa148a authored by Victor Stinner's avatar Victor Stinner

Merge 3.4 (asyncio doc)

parents 6682efa2 ed8e3a98
...@@ -250,6 +250,7 @@ TCP echo client using the :func:`asyncio.open_connection` function:: ...@@ -250,6 +250,7 @@ TCP echo client using the :func:`asyncio.open_connection` function::
import asyncio import asyncio
@asyncio.coroutine
def tcp_echo_client(message, loop): def tcp_echo_client(message, loop):
reader, writer = yield from asyncio.open_connection('127.0.0.1', 8888, reader, writer = yield from asyncio.open_connection('127.0.0.1', 8888,
loop=loop) loop=loop)
...@@ -379,6 +380,7 @@ Coroutine waiting until a socket receives data using the ...@@ -379,6 +380,7 @@ Coroutine waiting until a socket receives data using the
except ImportError: except ImportError:
from asyncio.windows_utils import socketpair from asyncio.windows_utils import socketpair
@asyncio.coroutine
def wait_for_data(loop): def wait_for_data(loop):
# Create a pair of connected sockets # Create a pair of connected sockets
rsock, wsock = socketpair() rsock, wsock = socketpair()
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment