CHttpServerContext

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 a Microsoft Internet Information Server (MIIS) 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.

#include <afxisapi.h>

Class MembersHierarchy Chart

Sample