I downloaded the file through Scoot, and when I remove VisionPro, the app will call the StreamDelegate method and return ". endEncountered". How can I solve this problem? Thank you!
Thank you for clarifying.
You'll want to check out Background Tasks for custom socket-based transfers.
Otherwise a more typical approach is to use URLSession configured for background downloading.
See Downloading files in the background for more info.