home *** CD-ROM | disk | FTP | other *** search
/ Chip 1998 February / CHIP_2_98.iso / software / pelne / optionp / iis4_07.cab / readme.txt6 < prev    next >
Text File  |  1997-10-25  |  1KB  |  25 lines

  1.     This sample demonstrates how to maintain a Keep-Alive connection while using worker
  2. threads in an ISAPI dll.  Please note the following points:
  3.  
  4. 1. The way that this dll maintains the connection is in the following
  5. line from WorkerFunction:
  6.  
  7.     dwState = HSE_STATUS_SUCCESS_AND_KEEP_CONN;
  8.     pECB->ServerSupportFunction(pECB->ConnID, HSE_REQ_DONE_WITH_SESSION, &dwState, NULL, 0);
  9.  
  10. The passing of dwState is what tells IIS to keep the connection open.
  11.  
  12. 2. A thread pool is used because if the thread that makes the above call
  13. to server support function exits or is terminated, the connection will
  14. be closed by IIS.  Using a thread pool avoids this. 
  15.  
  16. 3. This dll creates a number of system objects, which are not
  17. deallocated.  The presumption is that this dll will remain loaded until
  18. the INETINFO.EXE process terminates; at which point these objects will
  19. be released by the operating system.  However, if the WWW service is
  20. stopped and restarted without the INETINFO.EXE process ending, these
  21. objects will remain allocated, and new ones will be created when the dll
  22. is reloaded.  If it is desired to implement this sample code in a
  23. production environment, code to deallocate these objects should be added
  24. in DllMain or TerminateExtension. 
  25.