Moving a file over a local network

Let’s say I have two Xojo apps on the same local network. Is it possible for the app on computer A to copy a file from computer A to computer B so that the Xojo app on computer B can access it?

Essentially, I’m tinkering with a system to better manage my home arcade. I want to write a “server app” to run on an always-on computer in my study which will host my ROMs, artwork, etc. This app will pull down metadata for the games and store it in a database. I will then write another Xojo app to run on the Raspberry Pi-powered Mame machines I have in my garage. This app will present a front end for choosing which game to play, will request the correct file from the app on the server and then launch the correct emulator to play the game.

Obviously this is early stages of planning but I’m trying to plan the architecture correctly before I start coding.

So, short question: can Xojo transfer files between apps over the local network? Needs to work on Mac, Win and the Pi.

Oh, I am aware of things like Hyperspin but the setup is abysmal and I’d like the challenge of making my own system. Obviously happy to collaborate if there’s internet. Think Plex for emulation

If they’re accessible using a OS-provided network file management tools (e.g. SMB/Samba) then you could probably dispense with handling the file transfers yourself. Instead, get a FolderItem reference to the file’s network location and use the standard copyfile method, e.g:

Dim f As FolderItem = GetFolderItem("\\\\servername\\dir\\file1.bin") f.CopyFileTo(SpecialFolder.Desktop)

I don’t know how well this would work on a mixed-platform network, but SMB is pretty common even on Apple devices.

The alternative is to write your own server, which is a fun and interesting challenge in its own right. You can always build your own protocol from scratch, but if it were me I’d probably implement a basic HTTP/1.0 webserver to serve both files and metadata.