Note: The following was written for version 3+ of Web Connection.
Some names have changed since version 2.97 and before. [See Previous Version]
The numbers in parentheses represent the temporal sequence of the messaging mechanism. To understand the process flow, read the items in numerical order. Then, use the separate table rows to see how each step is divided between the various objects. You can also view these items in sequential order.
|
Object/PRG |
File-Based Messaging |
COM (Automation) Messaging |
|
WC.DLL |
(1) Creates a request file (e.g., WC_*.TMP), which includes a specification for the TMP filename to be created with the HTTP result. (11) Polls for a filename with a .RET extension, which is a signal that the TMP file is ready. When it sees it, the DLL grabs the corresponding .TMP file contents to give back to the web server. |
(1) Makes a direct COM call to the ProcessHit() method in a wwOleServer object.
(9) The string that is returned is then sent back to web server. |
|
Server Object |
wwServer Class (lComObject property = .F.) (2) Timer object (class wwFileTimer) regularly calls the CheckForMessageFile() method, which looks for new request files. (3) When a new TMP file is found, timer calls ProcessHit() method in the server, (4) which calls user's Process() method in wcmain.prg. (10) When process is complete, ProcessHit() calls SendReturnMessageFile(), which causes a 0-byte .RET file to be written. |
wwServer Class (lComObject property = .T.) (2) ProcessHit() method calls user's Process() method in wcmain.prg. (8) ProcessHit() method returns cOutput string to application that calls the COM server (wc.dll). Includes a cOutput property. |
| Main Program |
wcMain.PRG (or equivalent) (5) Process method calls user program (eg, wwdemo.prg). |
wcMain.PRG (or equivalent) (3) Process method calls user program (eg, wwdemo.prg). |
| Application Program |
wwDemo.PRG (or equivalent) (6) Instantiates a process object (defined in the same PRG) as a subclass of wwProcess, where the user scipts the Response object. One of the parameters tells the process class to instantiate a file-based HTML object. |
wwDemo.PRG (or equivalent) (4) Instantiates a process object (defined in the same PRG) as a subclass of wwProcess, where the user scipts the Response object. One of the parameters tells the process class to instantiate a string-based HTML object, used in COM messaging. |
| Process Object |
wwProcess Class (7) Instantiates a wwResponseFile object, passing it the file name from wwRequest.GetOutputFile(). |
wwProcess Class (5) Instantiates a wwResponseString object.(7) Destroy() method stores wwResponseString’s output directly to wwServer’s cOutput property. |
| ISAPI Request Object |
wwCGI/wwRequest Class (8) GetOutputFile() method gets Output File spec from the Server Variables portion of the request file. |
Not used directly in COM messaging scheme. Info from Request is passed directly from WC.DLL to the server object's ProcessHit() method. |
| Response (HTML) Object |
wwResponse Class (9) the Init() method creates a file with the filename (passed in by wwProcess) determined by the GetOutputFile() method of the wwRequest object. |
wwResponseString Class (6) A string property, cOutput, is used to build the entire HTTP result string. (A temporary file may be used internally to optimize speed for larger pages, but this is self-contained and not part of the messaging scheme.) |