/*----< do the tests >-----------------------------------------*/ #if (TEST_MPCOMM) static void Main(string[] args) { ClientEnvironment.verbose = true; TestUtilities.vbtitle("testing Message-Passing Communication", '='); /*----< uncomment to see Sender & Receiver testing >---------*/ /* TestUtilities.checkResult(testSndrRcvr(), "Sender & Receiver"); * TestUtilities.putLine(); * * TestUtilities.checkResult(testComm(), "Comm"); * TestUtilities.putLine(); * * TestUtilities.putLine("Press key to quit\n"); */ Receiver crcvr = new Receiver(); crcvr.start("http://localhost", 8081); Sender child = new Sender("http://localhost", 8081); CommMessage cmsg = new CommMessage(CommMessage.MessageType.request); cmsg.command = "Xmsl"; cmsg.author = "Client"; cmsg.to = "http://localhost:8081/IPluggableComm"; cmsg.from = "Repo"; child.postMessage(cmsg); crcvr.getMessage(); bool transferSuccess = child.postFile("TestRequest1.xml", "../../../ChildBuilder", "../../../RepoStorage"); ClientEnvironment.verbose = true; TestUtilities.checkResult(transferSuccess, "transfer"); if (ClientEnvironment.verbose) { Console.ReadKey(); } }
/*----< called by remote Comm to upload file >-----------------*/ public bool postFile(string filename) { return(sndr.postFile(filename)); }
/*----< called by remote Comm to upload file >-----------------*/ public bool postFile(string filename, string dest) { return(sndr.postFile(filename, dest)); }
/*----< called by remote Comm to upload file >-----------------*/ public bool postFile(string filename, string fileStorage) { return(sndr.postFile(filename, fileStorage)); }
/*----< called by remote Comm to upload file >-----------------*/ public bool postFile(string filename, int childProc, string buildRequest) { return(sndr.postFile(filename, childProc, buildRequest)); }
/*----< called by remote Comm to upload file >-----------------*/ public bool postFile(string filename, string child) { return(sndr.postFile(filename, child)); }
/*----< called by remote Comm to upload file >-----------------*/ public bool postFile(string filename, string senderpath, string recieverpath) { return(sndr.postFile(filename, senderpath, recieverpath)); }
/*----< called by remote Comm to upload file >-----------------*/ public bool postFile(string filename, string fromPath, string toPath) { return(sndr.postFile(filename, fromPath, toPath)); }
/*----< called by remote Comm to upload file >-----------------*/ public bool postFile(string filename, string from, string to) { return(sndr.postFile(filename, from, to)); }
/*----< called by remote Comm to upload file >-----------------*/ public bool postFile(string filename, string path) { return(sndr.postFile(filename, path, "../../../RepoStorage")); }
/*----< called by remote Comm to upload file >-----------------*/ public bool postFile(string filename, string builderid) { return(sndr.postFile(filename, builderid)); }
/*----< called by remote Comm to upload file >-----------------*/ public bool postFile(string source, string dest, string filename) { return(sndr.postFile(source, dest, filename)); }
/*----< called by remote Comm to upload file >-----------------*/ public bool postFile(string filename, string flag, string location) { return(sndr.postFile(filename, flag, location)); }
/*----< called by remote Comm to upload file >-----------------*/ public bool postFile(string filename, string fileFrom, string fileTo) { return(sndr.postFile(filename, fileFrom, fileTo)); }
/*----< called by remote Comm to upload file >-----------------*/ public bool postFile(string filename, string destinationAddress) { return(sndr.postFile(filename, destinationAddress)); }