public static void CopyFile(string id, int fileRegister1, string semantics, int fileRegister2, string salt) { Helper.Semantics semanticsId = getSemanticsId(semantics); IClientToPM client = (IClientToPM)GetProcess(id); client.Copy(fileRegister1, semanticsId, fileRegister2, Helper.StringToBytes(salt)); }
public static void ReadFile(string id, int fileRegister, string semantics, int byteRegister) { Helper.Semantics semanticsId = getSemanticsId(semantics); IClientToPM client = (IClientToPM)GetProcess(id); client.Read(fileRegister, semanticsId, byteRegister); }
public static void StartClient(string id, int port) { consoles.Add(Process.Start("Client.exe", id + " " + port)); IClientToPM client = (IClientToPM)Activator.GetObject( typeof(IClientToPM), Helper.GetUrl(id, port) ); processes[id] = client; SendMetadataLocations(client); }
public static void WriteFile(string id, int fileRegister, string contents) { IClientToPM client = (IClientToPM)GetProcess(id); client.Write(fileRegister, Helper.StringToBytes(contents)); }
public static void WriteFile(string id, int fileRegister, int byteRegister) { IClientToPM client = (IClientToPM)GetProcess(id); client.Write(fileRegister, byteRegister); }
public static void CreateFile(string id, string filename, int nbData, int readq, int writeq) { IClientToPM client = (IClientToPM)GetProcess(id); client.Create(filename, nbData, readq, writeq); }
public static void OpenFile(string id, string filename) { IClientToPM client = (IClientToPM)GetProcess(id); client.Open(filename); }
public static void DeleteFile(string id, string filename) { IClientToPM client = (IClientToPM)GetProcess(id); client.Delete(filename); }