by Davo Smith.
As already stated - there is no specification for the protocol between your plugin and the external repository, as that is entirely dependent on the external repository and your plugin. I've seen repository plugins that use SOAP or REST, but it is up to you to decide what protocol is right for your situation (you could use FTP, or even RFC1149, if you aren't too worried about latency). As a default, Moodle will use CURL to download the URL returned by your plugin, if the user asks to copy the file, but even that can be overridden by your plugin (the get_file() function).