Skip to content

Latest commit

 

History

History
55 lines (42 loc) · 3.78 KB

File metadata and controls

55 lines (42 loc) · 3.78 KB
title ISendResponseProvider::SetFlags Method
description Describes the ISendResponseProvider::SetFlags method and details its syntax, parameters, return value, remarks, code example, and requirements.
ms.date 10/07/2016
ms.assetid 854d8dd1-0c04-e658-3526-0baba7e36f96

ISendResponseProvider::SetFlags Method

Configures the flags for the current HTTP response.

Syntax

virtual VOID SetFlags(  
   DWORD dwFlags  
) = 0;  

Parameters

dwFlags
A DWORD that contains the response flags to set.

Return Value

VOID.

Remarks

You can use the SetFlags method to specify which response flags to use with 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.

Example

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.

Requirements

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

See Also

ISendResponseProvider Interface
ISendResponseProvider::GetFlags Method