Coded most of:
static char *sendfrag[] = { (char *)sendfrag_func, "sendfrag", "V", "pubkey", "name", "fragi", "numfrags", "ipaddr", "totalcrc", "datacrc", "data", 0 };
static char *gotfrag[] = { (char *)gotfrag_func, "gotfrag", "V", "pubkey", "name", "fragi", "numfrags", "src", "totalcrc", "datacrc", 0 };
static char *startxfer[] = { (char *)startxfer_func, "startxfer", "V", "fname", "dest", "data", 0 };
The sendfrag and gotfrag are working and are the main send and ack back and startxfer spawns a new task that loads a file into memory and loops on sendfrag, waiting for the gotfrag, resending if nothing back some reasonable timeframe, etc.
I havent decided how to store this yet as the prime use case is for MGW signed withdraw tx, which is always in RAM, but come to think of it, I do make a backup of it, so maybe I will just make these into files on the destination side.
James
tl:dr once startxfer is debugged, I can use that to sync between the MGW servers, also this can be directly used for InstantDEX and by any SuperNET API client