Ejemplo n.º 1
0
async def run_client(host, **kwargs):
    async with connect(host, 4433, **kwargs) as client:
        reader, writer = await client.create_stream()

        writer.write(b"ping")
        writer.write_eof()

        return await reader.read()
Ejemplo n.º 2
0
async def run_client(host, port=4433, request=b"ping", **kwargs):
    async with connect(host, port, **kwargs) as client:
        reader, writer = await client.create_stream()

        writer.write(request)
        writer.write_eof()

        return await reader.read()
Ejemplo n.º 3
0
 async def run_client_ping(host, **kwargs):
     async with connect(host, 4433, **kwargs) as client:
         await client.ping()
         await client.ping()
Ejemplo n.º 4
0
 async def run_client_key_update(host, **kwargs):
     async with connect(host, 4433, **kwargs) as client:
         await client.ping()
         client.request_key_update()
         await client.ping()