Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All

CHttpServerContext Class

Visual Studio .NET 2003
class CHttpServerContext

Remarks

CHttpServerContext does not have a base class.

CHttpServerContext provides the tools that a CHttpServer object needs to process data that a client has sent to the HTTP server. When Microsoft Internet Information Services receives a request from a client browser, a CHttpServer object is created and initialized, and a CHttpServerContext object is created. As the server extension DLL processes requests, it uses CHttpServerContext member functions to perform tasks.

A CHttpServerContext object exists separately from a CHttpServer object in order to allow multithreading. Only one CHttpServer exists in a module, but a server might be required to process multiple client requests simultaneously.

CHttpServer creates a CHttpServerContext for each request to handle these multiple requests. A CHttpServer uses multiple CHttpServerContext objects to run in separate threads. This design allows simultaneous, multiple calls to the CHttpServer object by different client connections.

When an extension DLL (ISA) is called, the member function ServerSupportFunction provides the ISA with some general-purpose functions as well as functions that are specific to HTTP server implementation.

If the server extension must communicate something — for example, an error — back to the client immediately, call WriteClient. Otherwise, the server should output a message to the client to the m_pStream data member owned by the pCtxt parameter passed to it.

Requirements

Header: afxisapi.h

See Also

MFC Sample WWWQUOTE

Class Members | Hierarchy Chart | How Do I Use the MFC ISAPI Classes Without Linking to the MFC DLL?

Show:
© 2015 Microsoft