Caution: The following was written for version 2.9x of Web Connection.
Some names/descriptions have changed in version 3.00 and later. [Version 3 Page]
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.
|
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 (2) Timer regularly calls CheckForCgiFiles() method, which looks for new request files. (3) When a new TMP file is found, ProcessHit() is called, (4) which calls user's Process() method in wcmain.prg. (10) When process is complete, ProcessHit() calls SendCgiReturnFile(), which causes a 0-byte .RET file to be written. |
wwOleServer Class (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 (5) Process method calls user program (eg, wwdemo.prg). |
wcMain.PRG (3) Process method calls user program (eg, wwdemo.prg). |
| Application Program |
wwDemo.PRG (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 (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 wwHTML object, passing it the file name from wwCGI.GetOutFile(). |
wwProcess Class (5) Instantiates a wwHTMLString object.(7) Destroy() method stores wwHtmlString’s output directly to wwOleServer’s cOutput property. |
| Request (CGI) Object |
wwCGI/wwPostRequest Class (8) GetOutFile() method gets Output File spec from the Server Variables portion of the request file. |
Not used directly in COM messaging scheme. |
| Response (HTML) Object |
wwHTML Class (9) the Init() method creates a file with the filename (passed in by wwProcess) determined by the GetOutFile() method of the wwCGI object. |
wwHtmlString 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.) |