code: async def tcp_echo_client(message, loop, host, port):
      
      print("Connecting to server at %s:%d" % (host, port))
      reader, writer = await asyncio.open_connection(host, port, loop=loop)
  
      writer.write(message.encode())
      print('Sent: %r' % message)
  
      data = await reader.read(100)
      print('Received: %r' % data.decode())
  
      writer.close()
docs: Generic python tcp echo client