<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/> <title>Wt: Wt::Http::ResponseContinuation Class Reference</title> <link href="tabs.css" rel="stylesheet" type="text/css"/> <link href="doxygen.css" rel="stylesheet" type="text/css" /> <link href="search/search.css" rel="stylesheet" type="text/css"/> <script type="text/javascript" src="jquery.js"></script> <script type="text/javascript" src="search/search.js"></script> <script type="text/javascript"> $(document).ready(function() { searchBox.OnSelectItem(0); }); </script> </head> <body> <div id="top"><!-- do not remove this div! --> <div id="titlearea"> <table cellspacing="0" cellpadding="0"> <tbody> <tr style="height: 56px;"> <td style="padding-left: 0.5em;"> <div id="projectname">Wt  <span id="projectnumber">3.2.3</span> </div> </td> </tr> </tbody> </table> </div> <!-- Generated by Doxygen 1.7.5.1 --> <script type="text/javascript"> var searchBox = new SearchBox("searchBox", "search",false,'Search'); </script> <div id="navrow1" class="tabs"> <ul class="tablist"> <li><a href="index.html"><span>Main Page</span></a></li> <li><a href="pages.html"><span>Related Pages</span></a></li> <li><a href="modules.html"><span>Modules</span></a></li> <li><a href="namespaces.html"><span>Namespaces</span></a></li> <li class="current"><a href="annotated.html"><span>Classes</span></a></li> <li><a href="files.html"><span>Files</span></a></li> <li> <div id="MSearchBox" class="MSearchBoxInactive"> <span class="left"> <img id="MSearchSelect" src="search/mag_sel.png" onmouseover="return searchBox.OnSearchSelectShow()" onmouseout="return searchBox.OnSearchSelectHide()" alt=""/> <input type="text" id="MSearchField" value="Search" accesskey="S" onfocus="searchBox.OnSearchFieldFocus(true)" onblur="searchBox.OnSearchFieldFocus(false)" onkeyup="searchBox.OnSearchFieldChange(event)"/> </span><span class="right"> <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a> </span> </div> </li> </ul> </div> <div id="navrow2" class="tabs2"> <ul class="tablist"> <li><a href="annotated.html"><span>Class List</span></a></li> <li><a href="inherits.html"><span>Class Hierarchy</span></a></li> <li><a href="functions.html"><span>Class Members</span></a></li> </ul> </div> <div id="nav-path" class="navpath"> <ul> <li class="navelem"><a class="el" href="namespaceWt.html">Wt</a> </li> <li class="navelem"><a class="el" href="namespaceWt_1_1Http.html">Http</a> </li> <li class="navelem"><a class="el" href="classWt_1_1Http_1_1ResponseContinuation.html">ResponseContinuation</a> </li> </ul> </div> </div> <div class="header"> <div class="summary"> <a href="#pub-methods">Public Member Functions</a> </div> <div class="headertitle"> <div class="title">Wt::Http::ResponseContinuation Class Reference<div class="ingroups"><a class="el" href="group__http.html">HTTP protocol (Wt::Http)</a></div></div> </div> </div> <div class="contents"> <!-- doxytag: class="Wt::Http::ResponseContinuation" --> <p>A resource response continuation object. <a href="classWt_1_1Http_1_1ResponseContinuation.html#details">More...</a></p> <p><code>#include <Wt/Http/ResponseContinuation></code></p> <p><a href="classWt_1_1Http_1_1ResponseContinuation-members.html">List of all members.</a></p> <table class="memberdecls"> <tr><td colspan="2"><h2><a name="pub-methods"></a> Public Member Functions</h2></td></tr> <tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classWt_1_1Http_1_1ResponseContinuation.html#a72fa6895f798e1270aa6e6a44222a9eb">setData</a> (const boost::any &data)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Set data associated with the continuation. <a href="#a72fa6895f798e1270aa6e6a44222a9eb"></a><br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top">boost::any </td><td class="memItemRight" valign="bottom"><a class="el" href="classWt_1_1Http_1_1ResponseContinuation.html#a92a3eb825c3df18ba5a6788315b8757b">data</a> ()</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Return data associated with the continuation. <a href="#a92a3eb825c3df18ba5a6788315b8757b"></a><br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a0d8a5bebd58915b47c97bc6afc8050e0"></a><!-- doxytag: member="Wt::Http::ResponseContinuation::resource" ref="a0d8a5bebd58915b47c97bc6afc8050e0" args="() const " --> <a class="el" href="classWt_1_1WResource.html">WResource</a> * </td><td class="memItemRight" valign="bottom"><a class="el" href="classWt_1_1Http_1_1ResponseContinuation.html#a0d8a5bebd58915b47c97bc6afc8050e0">resource</a> () const </td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Return the resource. <br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classWt_1_1Http_1_1ResponseContinuation.html#a3b441e3fa71a68b9dfb7091464e07433">waitForMoreData</a> ()</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Wait for more data. <a href="#a3b441e3fa71a68b9dfb7091464e07433"></a><br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><a class="el" href="classWt_1_1Http_1_1ResponseContinuation.html#a697ab2b700ae04307726e9a2ab2cbed9">isWaitingForMoreData</a> () const </td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Returns whether this continuation is waiting for data. <a href="#a697ab2b700ae04307726e9a2ab2cbed9"></a><br/></td></tr> </table> <hr/><a name="details" id="details"></a><h2>Detailed Description</h2> <div class="textblock"><p>A resource response continuation object. </p> <p>A response continuation object is used to keep track of a response which is to be continued.</p> <p>You may associate data with the object using <a class="el" href="classWt_1_1Http_1_1ResponseContinuation.html#a72fa6895f798e1270aa6e6a44222a9eb" title="Set data associated with the continuation.">setData()</a>.</p> <p>A continuation is used to resume sending more data later for this response. There are two possible reasons for this:</p> <ul> <li>the entire response is quite big and you may want to read and send it in smaller chunks. This avoids unbounded memory usage since the I/O layer buffers the response first in memory to send it then out to a possibly slow client using async I/O.</li> <li>you may not have any more data available, currently, but expect more data later. In that case you can call <a class="el" href="classWt_1_1Http_1_1ResponseContinuation.html#a3b441e3fa71a68b9dfb7091464e07433" title="Wait for more data.">waitForMoreData()</a> and later call <a class="el" href="classWt_1_1WResource.html#a1a9c35416eb690939ff288b053da3e1b" title="Indicate that more data is available.">WResource::haveMoreData()</a> when more data is available.</li> </ul> <dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="classWt_1_1Http_1_1Response.html#a5cb0800718188328fec17d3b84c85aab" title="Create a continuation object for this response.">Response::createContinuation()</a>, <a class="el" href="classWt_1_1Http_1_1Request.html#a2d4f88961a222be846460a8238823ae0" title="Returns a continuation object.">Request::continuation()</a> </dd></dl> </div><hr/><h2>Member Function Documentation</h2> <a class="anchor" id="a92a3eb825c3df18ba5a6788315b8757b"></a><!-- doxytag: member="Wt::Http::ResponseContinuation::data" ref="a92a3eb825c3df18ba5a6788315b8757b" args="()" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">boost::any Wt::Http::ResponseContinuation::data </td> <td>(</td> <td class="paramname"></td><td>)</td> <td></td> </tr> </table> </div> <div class="memdoc"> <p>Return data associated with the continuation. </p> <dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="classWt_1_1Http_1_1ResponseContinuation.html#a72fa6895f798e1270aa6e6a44222a9eb" title="Set data associated with the continuation.">setData()</a> </dd></dl> </div> </div> <a class="anchor" id="a697ab2b700ae04307726e9a2ab2cbed9"></a><!-- doxytag: member="Wt::Http::ResponseContinuation::isWaitingForMoreData" ref="a697ab2b700ae04307726e9a2ab2cbed9" args="() const " --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">bool Wt::Http::ResponseContinuation::isWaitingForMoreData </td> <td>(</td> <td class="paramname"></td><td>)</td> <td> const</td> </tr> </table> </div> <div class="memdoc"> <p>Returns whether this continuation is waiting for data. </p> <dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="classWt_1_1Http_1_1ResponseContinuation.html#a3b441e3fa71a68b9dfb7091464e07433" title="Wait for more data.">waitForMoreData()</a> </dd></dl> </div> </div> <a class="anchor" id="a72fa6895f798e1270aa6e6a44222a9eb"></a><!-- doxytag: member="Wt::Http::ResponseContinuation::setData" ref="a72fa6895f798e1270aa6e6a44222a9eb" args="(const boost::any &data)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">void Wt::Http::ResponseContinuation::setData </td> <td>(</td> <td class="paramtype">const boost::any & </td> <td class="paramname"><em>data</em></td><td>)</td> <td></td> </tr> </table> </div> <div class="memdoc"> <p>Set data associated with the continuation. </p> <p>You could do this to keep track of the state of sending the data for a <a class="el" href="classWt_1_1WResource.html" title="An object which can be rendered in the HTTP protocol.">WResource</a>. </p> </div> </div> <a class="anchor" id="a3b441e3fa71a68b9dfb7091464e07433"></a><!-- doxytag: member="Wt::Http::ResponseContinuation::waitForMoreData" ref="a3b441e3fa71a68b9dfb7091464e07433" args="()" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">void Wt::Http::ResponseContinuation::waitForMoreData </td> <td>(</td> <td class="paramname"></td><td>)</td> <td></td> </tr> </table> </div> <div class="memdoc"> <p>Wait for more data. </p> <p>This suspends the handling of this request until more data is available, which is indicated to a resource using <a class="el" href="classWt_1_1WResource.html#a1a9c35416eb690939ff288b053da3e1b" title="Indicate that more data is available.">WResource::haveMoreData()</a>. </p> </div> </div> </div> <!-- window showing the filter options --> <div id="MSearchSelectWindow" onmouseover="return searchBox.OnSearchSelectShow()" onmouseout="return searchBox.OnSearchSelectHide()" onkeydown="return searchBox.OnSearchSelectKey(event)"> <a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark"> </span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark"> </span>Classes</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark"> </span>Namespaces</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark"> </span>Files</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark"> </span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark"> </span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark"> </span>Typedefs</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(7)"><span class="SelectionMark"> </span>Enumerations</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(8)"><span class="SelectionMark"> </span>Enumerator</a></div> <!-- iframe showing the search results (closed by default) --> <div id="MSearchResultsWindow"> <iframe src="javascript:void(0)" frameborder="0" name="MSearchResults" id="MSearchResults"> </iframe> </div> <hr size="1"><address style="text-align: right; margin: 3px"><small> Generated on Thu Nov 1 2012 for <a href="http://www.webtoolkit.eu/wt">the C++ Web Toolkit (Wt)</a> by <a href="http://www.doxygen.org/index.html"><img src="doxygen.png" alt="doxygen" border="0" style="vertical-align: middle; display: inline-block; height: 2em"></a> 1.7.5.1</small></address> </body> </html>