blob: 22b712a7ef1c41173ee531bc208d6e24ec60f40b [file] [log] [blame]
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://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"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.20"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>Qpid Proton C++ API: listen_handler</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(document).ready(function() { init_search(); });
/* @license-end */
</script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
<tbody>
<tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">Qpid Proton C++ API
&#160;<span id="projectnumber">0.32.0</span>
</div>
</td>
<td> <div id="MSearchBox" class="MSearchBoxInactive">
<span class="left">
<img id="MSearchSelect" src="search/mag_sel.svg"
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.svg" alt=""/></a>
</span>
</div>
</td>
</tr>
</tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.20 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
var searchBox = new SearchBox("searchBox", "search",false,'Search');
/* @license-end */
</script>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
<div id="nav-tree">
<div id="nav-tree-contents">
<div id="nav-sync" class="sync"></div>
</div>
</div>
<div id="splitbar" style="-moz-user-select:none;"
class="ui-resizable-handle">
</div>
</div>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(document).ready(function(){initNavTree('classproton_1_1listen__handler.html',''); initResizable(); });
/* @license-end */
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
onmouseover="return searchBox.OnSearchSelectShow()"
onmouseout="return searchBox.OnSearchSelectHide()"
onkeydown="return searchBox.OnSearchSelectKey(event)">
</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>
<div class="header">
<div class="summary">
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="classproton_1_1listen__handler-members.html">List of all members</a> </div>
<div class="headertitle">
<div class="title">listen_handler</div> </div>
</div><!--header-->
<div class="contents">
<p><b>Unsettled API</b> - A handler for incoming connections.
<a href="classproton_1_1listen__handler.html#details">More...</a></p>
<p><code>#include &lt;<a class="el" href="listen__handler_8hpp_source.html">listen_handler.hpp</a>&gt;</code></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr class="memitem:a74a2a66bb05107bd04fbb15731b0578b"><td class="memItemLeft" align="right" valign="top"><a id="a74a2a66bb05107bd04fbb15731b0578b"></a>
virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classproton_1_1listen__handler.html#a74a2a66bb05107bd04fbb15731b0578b">on_open</a> (<a class="el" href="classproton_1_1listener.html">listener</a> &amp;)</td></tr>
<tr class="memdesc:a74a2a66bb05107bd04fbb15731b0578b"><td class="mdescLeft">&#160;</td><td class="mdescRight">Called when the listener is opened successfully. <br /></td></tr>
<tr class="separator:a74a2a66bb05107bd04fbb15731b0578b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a3f8b8dc9641dc3a3ed19e2a60ec8eccc"><td class="memItemLeft" align="right" valign="top">virtual <a class="el" href="classproton_1_1connection__options.html">connection_options</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classproton_1_1listen__handler.html#a3f8b8dc9641dc3a3ed19e2a60ec8eccc">on_accept</a> (<a class="el" href="classproton_1_1listener.html">listener</a> &amp;)</td></tr>
<tr class="memdesc:a3f8b8dc9641dc3a3ed19e2a60ec8eccc"><td class="mdescLeft">&#160;</td><td class="mdescRight">Called for each accepted connection. <a href="classproton_1_1listen__handler.html#a3f8b8dc9641dc3a3ed19e2a60ec8eccc">More...</a><br /></td></tr>
<tr class="separator:a3f8b8dc9641dc3a3ed19e2a60ec8eccc"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a0969610957fd465626cfad89db38ef53"><td class="memItemLeft" align="right" valign="top">virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classproton_1_1listen__handler.html#a0969610957fd465626cfad89db38ef53">on_error</a> (<a class="el" href="classproton_1_1listener.html">listener</a> &amp;, const std::string &amp;)</td></tr>
<tr class="memdesc:a0969610957fd465626cfad89db38ef53"><td class="mdescLeft">&#160;</td><td class="mdescRight">Called if there is a listening error, with an error message. <a href="classproton_1_1listen__handler.html#a0969610957fd465626cfad89db38ef53">More...</a><br /></td></tr>
<tr class="separator:a0969610957fd465626cfad89db38ef53"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:af30c2c3ffe8921962a164abb1b2a398e"><td class="memItemLeft" align="right" valign="top"><a id="af30c2c3ffe8921962a164abb1b2a398e"></a>
virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classproton_1_1listen__handler.html#af30c2c3ffe8921962a164abb1b2a398e">on_close</a> (<a class="el" href="classproton_1_1listener.html">listener</a> &amp;)</td></tr>
<tr class="memdesc:af30c2c3ffe8921962a164abb1b2a398e"><td class="mdescLeft">&#160;</td><td class="mdescRight">Called when this <a class="el" href="classproton_1_1listen__handler.html" title="Unsettled API - A handler for incoming connections.">listen_handler</a> is no longer needed, and can be deleted. <br /></td></tr>
<tr class="separator:af30c2c3ffe8921962a164abb1b2a398e"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p><b>Unsettled API</b> - A handler for incoming connections. </p>
<p>Implement this interface and pass to <a class="el" href="classproton_1_1container.html#a9e138b28e9589583915cf5c5e0e7a524" title="Listen for new connections on listen_url.">proton::container::listen()</a> to be notified of new connections. </p>
<dl class="section examples"><dt>Examples</dt><dd><a class="el" href="broker_8cpp-example.html#_a33">broker.cpp</a>, <a class="el" href="direct_recv_8cpp-example.html#_a1">direct_recv.cpp</a>, <a class="el" href="direct_send_8cpp-example.html#_a1">direct_send.cpp</a>, and <a class="el" href="server_direct_8cpp-example.html#_a1">server_direct.cpp</a>.</dd>
</dl>
</div><h2 class="groupheader">Member Function Documentation</h2>
<a id="a3f8b8dc9641dc3a3ed19e2a60ec8eccc"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a3f8b8dc9641dc3a3ed19e2a60ec8eccc">&#9670;&nbsp;</a></span>on_accept()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">virtual <a class="el" href="classproton_1_1connection__options.html">connection_options</a> on_accept </td>
<td>(</td>
<td class="paramtype"><a class="el" href="classproton_1_1listener.html">listener</a> &amp;&#160;</td>
<td class="paramname"></td><td>)</td>
<td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">virtual</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Called for each accepted connection. </p>
<p>Returns <a class="el" href="classproton_1_1connection__options.html" title="Options for creating a connection.">connection_options</a> to apply, including a <a class="el" href="classproton_1_1messaging__handler.html" title="Handler for Proton messaging events.">proton::messaging_handler</a> for the connection. <a class="el" href="classproton_1_1messaging__handler.html#a41277abe0e33a3df2764b08dcc12d768" title="The remote peer opened the connection: called once on initial open, and again on each successful auto...">messaging_handler::on_connection_open()</a> will be called with the <a class="el" href="classproton_1_1connection.html" title="A connection to a remote AMQP peer.">proton::connection</a>, it can call <a class="el" href="classproton_1_1connection.html#a9e8555112049fc2b4945120b3c45f8ab" title="Open the connection.">connection::open()</a> to accept or <a class="el" href="classproton_1_1connection.html#a5ae591df94fc66ccb85cbb6565368bca" title="Close the connection.">connection::close()</a> to reject the connection. </p>
</div>
</div>
<a id="a0969610957fd465626cfad89db38ef53"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a0969610957fd465626cfad89db38ef53">&#9670;&nbsp;</a></span>on_error()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">virtual void on_error </td>
<td>(</td>
<td class="paramtype"><a class="el" href="classproton_1_1listener.html">listener</a> &amp;&#160;</td>
<td class="paramname">, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const std::string &amp;&#160;</td>
<td class="paramname">&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">virtual</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Called if there is a listening error, with an error message. </p>
<p>close() will also be called. </p>
</div>
</div>
<hr/>The documentation for this class was generated from the following file:<ul>
<li>proton/<a class="el" href="listen__handler_8hpp_source.html">listen_handler.hpp</a></li>
</ul>
</div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
<ul>
<li class="navelem"><a class="el" href="namespaceproton.html">proton</a></li><li class="navelem"><a class="el" href="classproton_1_1listen__handler.html">listen_handler</a></li>
<li class="footer">Generated by <a href="http://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.8.20 </li>
</ul>
</div>
</body>
</html>