Need suggested design for File Download for updating end-users application

I’m shipping an appliance with an embedded system running an XOJO app. I’m creating a secondary app that will handle downloading a replacement for the primary app - likely hosted on our web server as a .gz (zipped) file.

What is the best Socket control (or other control) for this?

I’d need to pass a fully-qualified path to the desired file, not just a server address in general.

In a perfect world I’d setup the Socket, pass it the address of the file to Read, create a local copy of the file, unzip it, and then do a bunch of file copying etc. (to ‘install’ it in replacement of the existing app)

This is a very high-level description, not trying to into too many details with this posting, just fishing for some good file-transfer techniques.

Thanks as always for any suggestions!

@William Reynolds — Well the advantage of TCPSocket over Socket or UDPSocket is that TCPSocket includes a transmission-error-system (to my recollection), so you should never get invalid packets.

But for an appliance, the server and the clients should also exchange a cryptographic signature.

It looks like URLConnection is the right choice, it has all the utility needed to do exactly what I was after.