| title | ISendResponseProvider::GetFlags Method |
|---|---|
| description | Learn how the ISendResponseProvider::GetFlags method retrieves the flags for the current HTTP response. |
| ms.date | 10/07/2016 |
| ms.assetid | 3062e690-a714-515f-bdc8-7f7ec38716e9 |
Retrieves the flags for the current HTTP response.
virtual DWORD GetFlags(
VOID
) const = 0; This method takes no parameters.
A DWORD that contains the response flags.
You can use the GetFlags method to retrieve the response flags for the current response. These flags provide additional control over the HTTP behavior for [!INCLUDEiisver]. The following flags are defined in the Http.h header file.
| Name | Value | Description |
|---|---|---|
| HTTP_SEND_RESPONSE_FLAG_DISCONNECT | 0x00000001 | Disconnects the network connection immediately after the response is sent. |
| HTTP_SEND_RESPONSE_FLAG_MORE_DATA | 0x00000002 | Sends additional data in the response. |
| HTTP_SEND_RESPONSE_FLAG_BUFFER_DATA | 0x00000004 | Buffers the response before it is sent. |
| HTTP_SEND_RESPONSE_FLAG_ENABLE_NAGLING | 0x00000008 | Enables the Nagle algorithm to optimize TCP response packets. |
The following code example demonstrates how to use the SetFlags and GetFlags methods to create an HTTP module that sets the flags for the current response. The example then retrieves the modified flags and returns the response to a Web client.
[!code-cppISendResponseProviderGetFlags#1]
Your module must export the RegisterModule function. You can export this function by creating a module definition (.def) file for your project, or you can compile the module by using the /EXPORT:RegisterModule switch. For more information, see Walkthrough: Creating a Request-Level HTTP Module By Using Native Code.
You can optionally compile the code by using the __stdcall (/Gz) calling convention instead of explicitly declaring the calling convention for each function.
| Type | Description |
|---|---|
| Client | - IIS 7.0 on [!INCLUDEwinvista] - IIS 7.5 on Windows 7 - IIS 8.0 on Windows 8 - IIS 10.0 on Windows 10 |
| Server | - IIS 7.0 on [!INCLUDEwinsrv2008] - IIS 7.5 on Windows Server 2008 R2 - IIS 8.0 on Windows Server 2012 - IIS 8.5 on Windows Server 2012 R2 - IIS 10.0 on Windows Server 2016 |
| Product | - IIS 7.0, IIS 7.5, IIS 8.0, IIS 8.5, IIS 10.0 - [!INCLUDEiisexp75], [!INCLUDEiisexp80], [!INCLUDEiisexp100] |
| Header | Httpserv.h |
ISendResponseProvider Interface
ISendResponseProvider::SetFlags Method