CHttpServerContext::SetChunkSize

DWORD SetChunkSize( DWORD dwNewSize );

Return Value

The previous chunk size.

Parameters

dwNewSize

New chunk size.

Remarks

Call this member function to set the chunk size for the current context. The chunk size is the number of bytes that MFC will send back in an individual write operation when writing data from the body of the stream within the CHttpServerContext object back to the client. The chunk size is initially zero when the context is created. A chunk size of zero means that MFC will attempt to write the entire stream in one operation. Any other value causes the framework to divide the body of the response into chunks no larger than the specified size.

Setting a chunk size is not always necessary, but it can be required when you use HTTPS, because HTTPS is limited to writing 14 kilobytes per operation at a maximum. HTTPS is a variant of the HTTP protocol that uses the secure-sockets layer for its transport protocol.

CHttpServerContext OverviewClass MembersHierarchy Chart

See Also   CHttpServerContext::GetChunkSize, CHttpServer::OnWriteBody