📄 htconlen.h
字号:
/* W3C Sample Code Library libwww Content Length Counter and Other Buffer Streams! Content Length Counter and Other Buffer Streams!*//*** (c) COPYRIGHT MIT 1995.** Please first read the full copyright statement in the file COPYRIGH.*//*This module provides various forms of buffering streams. You can also checkout the chunk buffer stream which converts astream to a memory buffer. These streams preseerve the streaming model.The content length counter stream buffers the result to find outthe content length before the data is forwarded to the target stream.You can use this stream when generating a HTTP response in order to findthe content length before writing the object to the socket, for example.This module is implemented by HTConLen.c, and itis a part of the W3C Sample CodeLibrary.*/#ifndef HTCONLEN_H#define HTCONLEN_H/*. Buffer Stream.This stream does almost the same as the content length counter stream exceptthat it doesn't count the length! In other words - it's a completely normalmemory buffer for the stream. If the buffer fills up, this stream flushesthe buffer and goes transparent so that all new data will be pumped throughwithout any buffering.*/extern HTStream * HTBuffer_new (HTStream * target, HTRequest * request, int max_size);/*. Content Length Counter Stream.This stream can be inserted anywhere to count the content length of the body.The result is passed to the Anchor object ofthis request so that future requests for the content length will get theright size.*/extern HTStream * HTContentCounter (HTStream * target, HTRequest * request, int max_size);/*. Delay Buffer Stream.This stream is much like the buffer stream above but instead of goin transparentwhen the buffer fills up, it returns HT_PAUSE which indicatesthat the stream doesn't accept more data and so the caller should not putany more data into it. When the buffer is flushed (the flush method invoked)then the stream goes into transparent mode, just like the buffer stream.*/extern HTStream * HTDelayBuffer (HTStream * target, int max_size);/*. Pipe Buffer Stream.This stream is much like the buffer stream above but instead of goin transparentwhen the buffer fills up, it returns HT_PAUSE which indicatesthat the stream doesn't accept more data and so the caller should not putany more data into it.*/extern HTStream * HTPipeBuffer (HTStream * target, int max_size);/*End of definition module*/#endif /* HTCONLEN_H *//* @(#) $Id: HTConLen.html,v 2.8 1998/05/14 02:10:21 frystyk Exp $*/
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -