⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 ebbuff.html

📁 eybuild中文手册 eybuild中文手册 eybuild中文手册
💻 HTML
📖 第 1 页 / 共 2 页
字号:
<html>
<head>
<!-- E:/eybuild/doc/export//ebbuff.html - generated by refgen from ebbuff.c -->
 <title> ebbuff </title>
</head>
<body bgcolor="#FFFFFF"> <hr>

<a name="top"></a>
<p align=right>
<a href="libIndex.htm"><i>eyBuildLib API Reference :  eyBuildLib</i></a></p>

</blockquote><h1>ebbuff</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote>  
<p><strong>ebbuff</strong> - a high efficiency I/O buffer for CSP </p>


</blockquote><h4>ROUTINES</h4><blockquote><p>
<p>
<b><a href="./ebbuff.html#ebBufTlvAdd">ebBufTlvAdd</a>(&nbsp;)</b>  -  add data to tlv buffer<br>
<b><a href="./ebbuff.html#ebBufReset">ebBufReset</a>(&nbsp;)</b>  -  reset the state to initialization state<br>
<b><a href="./ebbuff.html#ebBufCreate">ebBufCreate</a>(&nbsp;)</b>  -  allocate a new tlv buffer then init it<br>
<b><a href="./ebbuff.html#ebBufDistroy">ebBufDistroy</a>(&nbsp;)</b>  -  free eybuild buffer<br>
<b><a href="./ebbuff.html#ebBufResize">ebBufResize</a>(&nbsp;)</b>  -  change tlv buffer size to new size<br>
<b><a href="./ebbuff.html#ebBufIsAutoFlush">ebBufIsAutoFlush</a>(&nbsp;)</b>  -  check allow auto flush or not<br>
<b><a href="./ebbuff.html#ebSetBufAutoFlush">ebSetBufAutoFlush</a>(&nbsp;)</b>  -  set allow auto flush or not<br>
<b><a href="./ebbuff.html#ebGetBufRemain">ebGetBufRemain</a>(&nbsp;)</b>  -  get the remain size for data write to avaiable<br>
<b><a href="./ebbuff.html#ebBufFlush">ebBufFlush</a>(&nbsp;)</b>  -  flush eybuild buffer<br>
<b><a href="./ebbuff.html#ebBufIsFlushed">ebBufIsFlushed</a>(&nbsp;)</b>  -  check buffer ever flushed or not<br>
<b><a href="./ebbuff.html#ebCheckBufSize">ebCheckBufSize</a>(&nbsp;)</b>  -  check tlv buffer size<br>
<b><a href="./ebbuff.html#ebBufStringAdd">ebBufStringAdd</a>(&nbsp;)</b>  -  add a const string to the eybuild buffer<br>
<b><a href="./ebbuff.html#ebprintf">ebprintf</a>(&nbsp;)</b>  -  write a formatted string to the eybuild buffer<br>
<b><a href="./ebbuff.html#ebvprintf">ebvprintf</a>(&nbsp;)</b>  -  write a formatted string to the eybuild buffer<br>
<b><a href="./ebbuff.html#ebWriteBlock">ebWriteBlock</a>(&nbsp;)</b>  -  write binary data block<br>
<p>
</blockquote><h4>DESCRIPTION</h4><blockquote><p>
This module provided a high efficiency I/O buffer. It will be used by 
CSP page to buffering data, which is outputed by <b><a href="./ebbuff.html#ebprintf">ebprintf</a>(&nbsp;)</b>, <b>ebEvaluate(&nbsp;)</b>
<b><a href="./ebbuff.html#ebBufStringAdd">ebBufStringAdd</a>(&nbsp;)</b>.
<p>
User can call <b><a href="./ebbuff.html#ebBufIsAutoFlush">ebBufIsAutoFlush</a>(&nbsp;)</b>, <b><a href="./ebbuff.html#ebGetBufRemain">ebGetBufRemain</a>(&nbsp;)</b>, <b><a href="./ebbuff.html#ebCheckBufSize">ebCheckBufSize</a>(&nbsp;)</b> to get 
current buffer properties; User can call <b><a href="./ebbuff.html#ebBufResize">ebBufResize</a>(&nbsp;)</b>, <b><a href="./ebbuff.html#ebSetBufAutoFlush">ebSetBufAutoFlush</a>(&nbsp;)</b>, 
<b><a href="./ebbuff.html#ebBufFlush">ebBufFlush</a>(&nbsp;)</b>, <b><a href="./ebbuff.html#ebBufReset">ebBufReset</a>(&nbsp;)</b> to set buffer properties; User can call <b><a href="./ebbuff.html#ebprintf">ebprintf</a>(&nbsp;)</b>, 
<b><a href="./ebbuff.html#ebBufStringAdd">ebBufStringAdd</a>(&nbsp;)</b>, <b>ebEvaluate(&nbsp;)</b> add data to buffer.
<p>
When you call <b><a href="./ebrespond.html#ebHeader">ebHeader</a>(&nbsp;)</b>, <b><a href="./ebrespond.html#ebRedirect">ebRedirect</a>(&nbsp;)</b>, it will check the buffer state. 
If has data flushed before, they will return ERROR. Because those data 
should be output before CSP page data output.
<p>
Usually user needn't call <b><a href="./ebbuff.html#ebBufCreate">ebBufCreate</a>(&nbsp;)</b>, <b><a href="./ebbuff.html#ebBufDistroy">ebBufDistroy</a>(&nbsp;)</b> to create and 
distory a CSP page buffer.
<p>
</blockquote><h4>INCLUDE</h4><blockquote><p>
<b>ebbuff.h</b>
<p>
</blockquote><h4>ALSO SEE</h4><blockquote><p>
<p>
<b>snprintf(&nbsp;)</b>

<hr>
<a name="ebBufTlvAdd"></a>
<p align=right>
<a href="rtnIndex.htm"><i>eyBuildLib :  Routines</i></a></p>

</blockquote><h1>ebBufTlvAdd(&nbsp;)</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote>  
<p><strong>ebBufTlvAdd(&nbsp;)</strong> - add data to tlv buffer</p>

</blockquote><h4>SYNOPSIS</h4><blockquote><p>
<pre>int ebBufTlvAdd
    (
    void * ebfp,
    int    type,
    int    len,
    char * pdata
    )
</pre>

</blockquote><h4>DESCRIPTION</h4><blockquote><p>
this routine will add data to tlv buffer and let current tlv pointer
pointer to next tlv. 
Before call it, you should call <b><a href="./ebbuff.html#ebCheckBufSize">ebCheckBufSize</a>(&nbsp;)</b> to check the buffer 
size if longer enough.
<p>
</blockquote><h4>RETURNS</h4><blockquote><p>
OK/ERROR
</blockquote><h4>SEE ALSO</h4><blockquote><p>
<b><a href="./ebbuff.html#top">ebbuff</a></b>

<hr>
<a name="ebBufReset"></a>
<p align=right>
<a href="rtnIndex.htm"><i>eyBuildLib :  Routines</i></a></p>

</blockquote><h1>ebBufReset(&nbsp;)</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote>  
<p><strong>ebBufReset(&nbsp;)</strong> - reset the state to initialization state</p>

</blockquote><h4>SYNOPSIS</h4><blockquote><p>
<pre>int ebBufReset
    (
    void * ebfp
    )
</pre>

</blockquote><h4>DESCRIPTION</h4><blockquote><p>
</blockquote><h4>RETURNS</h4><blockquote><p>
OK/ERROR
</blockquote><h4>SEE ALSO</h4><blockquote><p>
<b><a href="./ebbuff.html#top">ebbuff</a></b>

<hr>
<a name="ebBufCreate"></a>
<p align=right>
<a href="rtnIndex.htm"><i>eyBuildLib :  Routines</i></a></p>

</blockquote><h1>ebBufCreate(&nbsp;)</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote>  
<p><strong>ebBufCreate(&nbsp;)</strong> - allocate a new tlv buffer then init it</p>

</blockquote><h4>SYNOPSIS</h4><blockquote><p>
<pre>void * ebBufCreate
    (
    int size
    )
</pre>

</blockquote><h4>DESCRIPTION</h4><blockquote><p>
</blockquote><h4>RETURNS</h4><blockquote><p>
the descriptor of new this new buffer, or NULL if error
</blockquote><h4>SEE ALSO</h4><blockquote><p>
<b><a href="./ebbuff.html#top">ebbuff</a></b>

<hr>
<a name="ebBufDistroy"></a>
<p align=right>
<a href="rtnIndex.htm"><i>eyBuildLib :  Routines</i></a></p>

</blockquote><h1>ebBufDistroy(&nbsp;)</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote>  
<p><strong>ebBufDistroy(&nbsp;)</strong> - free eybuild buffer</p>

</blockquote><h4>SYNOPSIS</h4><blockquote><p>
<pre>void ebBufDistroy
    (
    void * ebfp
    )
</pre>

</blockquote><h4>DESCRIPTION</h4><blockquote><p>
this routine will not auto flush data in buffer, so before call 
function you shoud call <b><a href="./ebbuff.html#ebBufFlush">ebBufFlush</a>(&nbsp;)</b> manually to flush data. 
<p>
</blockquote><h4>RETURNS</h4><blockquote><p>
NONE
</blockquote><h4>SEE ALSO</h4><blockquote><p>
<b><a href="./ebbuff.html#top">ebbuff</a></b>

<hr>
<a name="ebBufResize"></a>
<p align=right>
<a href="rtnIndex.htm"><i>eyBuildLib :  Routines</i></a></p>

</blockquote><h1>ebBufResize(&nbsp;)</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote>  
<p><strong>ebBufResize(&nbsp;)</strong> - change tlv buffer size to new size</p>

</blockquote><h4>SYNOPSIS</h4><blockquote><p>
<pre>int ebBufResize
    (
    void * ebfp,
    int    size
    )
</pre>

</blockquote><h4>DESCRIPTION</h4><blockquote><p>
this routine will not flush the original data, but copy to the new buffer
if no enough dynamic memory will return ERROR
<p>
</blockquote><h4>RETURNS</h4><blockquote><p>
OK/ERROR
</blockquote><h4>SEE ALSO</h4><blockquote><p>
<b><a href="./ebbuff.html#top">ebbuff</a></b>

<hr>
<a name="ebBufIsAutoFlush"></a>
<p align=right>
<a href="rtnIndex.htm"><i>eyBuildLib :  Routines</i></a></p>

</blockquote><h1>ebBufIsAutoFlush(&nbsp;)</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote>  
<p><strong>ebBufIsAutoFlush(&nbsp;)</strong> - check allow auto flush or not</p>

</blockquote><h4>SYNOPSIS</h4><blockquote><p>
<pre>int ebBufIsAutoFlush
    (
    void * ebfp
    )
</pre>

</blockquote><h4>DESCRIPTION</h4><blockquote><p>
</blockquote><h4>RETURNS</h4><blockquote><p>
TRUE/FALSE
</blockquote><h4>SEE ALSO</h4><blockquote><p>
<b><a href="./ebbuff.html#top">ebbuff</a></b>

<hr>
<a name="ebSetBufAutoFlush"></a>
<p align=right>
<a href="rtnIndex.htm"><i>eyBuildLib :  Routines</i></a></p>

</blockquote><h1>ebSetBufAutoFlush(&nbsp;)</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote>  
<p><strong>ebSetBufAutoFlush(&nbsp;)</strong> - set allow auto flush or not</p>

</blockquote><h4>SYNOPSIS</h4><blockquote><p>
<pre>int ebSetBufAutoFlush
    (
    void * ebfp,              /* eybuild buffer descriptor */
    BOOL   autoflush
    )
</pre>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -