Пример #1
0
    def coro():

        try:

            yield from server.start(None, 8888)
            yield from client.connect("127.0.0.1", 8888)
            yield from client.login()

        finally:

            server.close()
            yield from server.wait_closed()
Пример #2
0
    def coro():

        try:

            yield from server.start(None, 8888)
            yield from client.connect("127.0.0.1", 8888)
            yield from client.login()

        finally:

            server.close()
            yield from server.wait_closed()
Пример #3
0
    def coro():

        try:

            yield from server.start(None, 8888)
            yield from client.connect("127.0.0.1", 8888)
            yield from asyncio.sleep(10, loop=loop)

        finally:

            server.close()
            yield from server.wait_closed()
Пример #4
0
    def coro():

        try:

            yield from server.start(None, 8888)
            yield from client.connect("127.0.0.1", 8888)
            yield from asyncio.sleep(10, loop=loop)

        finally:

            server.close()
            yield from server.wait_closed()