When IIS receives a request for your ISAPI extension, it loads the DLL and calls the GetExtensionVersion entry point function. GetExtensionVersion returns a pointer to an HSE_VERSION_INFO structure. IIS then calls the HttpExtensionProc function with a pointer to an Extension_Control_Block (ECB) structure. Your extension processes the data contained in the ECB and uses the callback functions in ECB to write back responses to the client. When the extension is no longer needed, IIS calls the TerminateExtension function to unload the extension from memory.
After IIS finishes processing a request for an ISAPI, it can either close the connection or keep it open. A request can specify that the connection should remain open by specifying the Connection: Keep-Alive header. (With all HTTP 1.1 requests the Connection Keep-Alive header is included by default.) If you have designed your ISAPI extension to support Keep-Alive requests, you should indicate this to the client by calling the ServerSupporFunction and specifying the HSE_REQ_SEND_RESPONSE_HEADER value for the dwHSERequest parameter. The response header you specify should contain Connection: Keep-Alive. The following code demonstrates sending the Keep-Alive header:
DWORD SendHeaderToClient( LPEXTENSION_BLOCK pECB ) { BOOL fReturn; CHAR szHeader[256] = ""; DWORD hseStatus = HSE_STATUS_SUCCESS; strcpy(szHeader, "Content-type: test/html\r\n\r\n"); fReturn = pECB->ServerSupportFunction(pECB->ConnID, HSE_REQ_SEND_RESPONSE_HEADER, "Connection:Keep-Alive" // Telling the client not to close the connection NULL, (LPDWORD) szHeader); if (! fReturn ) { hseStatus = HSE_STATUS_ERROR; } return (hseStatus); }
If the request has indicated that the connection should remain open, subsequent requests can be sequential or pipelined. When a client pipelines requests, it does not need to wait for earlier requests to be serviced before sending subsequent requests. IIS guarantees that pipelined requests will be returned to the client in the order they were received. IIS manages the ordering of request internally, so your extension does not need to add any special processing for pipelined requests.
For more details on pipelined requests, see RFC 2068 published by the World Wide Web consortium. RFC 2068 is available at http://www.isi.edu.
© 1997 by Microsoft Corporation. All rights reserved.
file: /Techref/inet/iis/iis/htm/sdk/isap1vtz.htm, 4KB, , updated: 2002/5/22 16:37, local time: 2025/7/16 01:07,
216.73.216.26,10-3-84-166:LOG IN
|
©2025 These pages are served without commercial sponsorship. (No popup ads, etc...).Bandwidth abuse increases hosting cost forcing sponsorship or shutdown. This server aggressively defends against automated copying for any reason including offline viewing, duplication, etc... Please respect this requirement and DO NOT RIP THIS SITE. Questions? <A HREF="http://www.piclist.com/techref/inet/iis/iis/htm/sdk/isap1vtz.htm"> Extension Request Processing</A> |
Did you find what you needed? |
![]() o List host: MIT, Site host massmind.org, Top posters @none found - Page Editors: James Newton, David Cary, and YOU! * Roman Black of Black Robotics donates from sales of Linistep stepper controller kits. * Ashley Roll of Digital Nemesis donates from sales of RCL-1 RS232 to TTL converters. * Monthly Subscribers: Gregg Rew. on-going support is MOST appreciated! * Contributors: Richard Seriani, Sr. |
Ashley Roll has put together a really nice little unit here. Leave off the MAX232 and keep these handy for the few times you need true RS232! |
.