| 1 | <?xml version="1.0" encoding="UTF-8" standalone="no"?> |
| 2 | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> |
| 3 | <html xmlns="http://www.w3.org/1999/xhtml"> |
| 4 | <head> |
| 5 | <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> |
| 6 | <title>DbChannel::close()</title> |
| 7 | <link rel="stylesheet" href="apiReference.css" type="text/css" /> |
| 8 | <meta name="generator" content="DocBook XSL Stylesheets V1.73.2" /> |
| 9 | <link rel="start" href="index.html" title="Berkeley DB C++ API Reference" /> |
| 10 | <link rel="up" href="rep.html" title="Chapter 11. Replication Methods" /> |
| 11 | <link rel="prev" href="db_site.html" title="The DbSite Handle" /> |
| 12 | <link rel="next" href="dbchannel_send_msg.html" title="DbChannel::send_msg()" /> |
| 13 | </head> |
| 14 | <body> |
| 15 | <div xmlns="" class="navheader"> |
| 16 | <div class="libver"> |
| 17 | <p>Library Version 11.2.5.3</p> |
| 18 | </div> |
| 19 | <table width="100%" summary="Navigation header"> |
| 20 | <tr> |
| 21 | <th colspan="3" align="center">DbChannel::close()</th> |
| 22 | </tr> |
| 23 | <tr> |
| 24 | <td width="20%" align="left"><a accesskey="p" href="db_site.html">Prev</a> </td> |
| 25 | <th width="60%" align="center">Chapter 11. |
| 26 | Replication Methods |
| 27 | </th> |
| 28 | <td width="20%" align="right"> <a accesskey="n" href="dbchannel_send_msg.html">Next</a></td> |
| 29 | </tr> |
| 30 | </table> |
| 31 | <hr /> |
| 32 | </div> |
| 33 | <div class="sect1" lang="en" xml:lang="en"> |
| 34 | <div class="titlepage"> |
| 35 | <div> |
| 36 | <div> |
| 37 | <h2 class="title" style="clear: both"><a id="dbchannel_close"></a>DbChannel::close()</h2> |
| 38 | </div> |
| 39 | </div> |
| 40 | </div> |
| 41 | <pre class="programlisting">#include <db_cxx.h> |
| 42 | |
| 43 | int |
| 44 | DbChannel::close(u_int32_t flags);</pre> |
| 45 | <p> |
| 46 | The <code class="methodname">DbChannel::close()</code> method |
| 47 | closes the DbChannel handle, freeing any resources |
| 48 | allocated to the handle. All DbChannel handles must be |
| 49 | closed before the encompassing environment handle is closed. |
| 50 | Also, all on-going messaging operations on the channel should be |
| 51 | allowed to complete before attempting to close the channel handle. |
| 52 | </p> |
| 53 | <p> |
| 54 | After <code class="methodname">DbChannel::close()</code> has been |
| 55 | called, regardless of its return, the DbChannel handle may |
| 56 | not be accessed again. |
| 57 | </p> |
| 58 | <p> |
| 59 | The <code class="methodname">DbChannel::close()</code> <span> |
| 60 | |
| 61 | <span> |
| 62 | method either returns a non-zero error value or throws an |
| 63 | exception that encapsulates a non-zero error value on |
| 64 | failure, and returns 0 on success. |
| 65 | </span> |
| 66 | </span> |
| 67 | </p> |
| 68 | <div class="sect2" lang="en" xml:lang="en"> |
| 69 | <div class="titlepage"> |
| 70 | <div> |
| 71 | <div> |
| 72 | <h3 class="title"><a id="idp9246680"></a>Parameters</h3> |
| 73 | </div> |
| 74 | </div> |
| 75 | </div> |
| 76 | <div class="sect3" lang="en" xml:lang="en"> |
| 77 | <div class="titlepage"> |
| 78 | <div> |
| 79 | <div> |
| 80 | <h4 class="title"><a id="idp9288464"></a>flags</h4> |
| 81 | </div> |
| 82 | </div> |
| 83 | </div> |
| 84 | <p> |
| 85 | This parameter is currently unused, and must be |
| 86 | set to 0. |
| 87 | </p> |
| 88 | </div> |
| 89 | </div> |
| 90 | <div class="sect2" lang="en" xml:lang="en"> |
| 91 | <div class="titlepage"> |
| 92 | <div> |
| 93 | <div> |
| 94 | <h3 class="title"><a id="idp9128624"></a>Errors</h3> |
| 95 | </div> |
| 96 | </div> |
| 97 | </div> |
| 98 | <p> |
| 99 | The <code class="methodname">DbChannel::close()</code> |
| 100 | <span> |
| 101 | |
| 102 | <span> |
| 103 | method may fail and throw a <a class="link" href="dbexception.html" title="Chapter 6. The DbException Class">DbException</a> |
| 104 | exception, encapsulating one of the following non-zero errors, or return one |
| 105 | of the following non-zero errors: |
| 106 | </span> |
| 107 | </span> |
| 108 | </p> |
| 109 | <div class="sect3" lang="en" xml:lang="en"> |
| 110 | <div class="titlepage"> |
| 111 | <div> |
| 112 | <div> |
| 113 | <h4 class="title"><a id="idp9324216"></a>EINVAL</h4> |
| 114 | </div> |
| 115 | </div> |
| 116 | </div> |
| 117 | <p> |
| 118 | If this method is called from a Base API application, |
| 119 | or if an invalid flag value or parameter was specified. |
| 120 | </p> |
| 121 | </div> |
| 122 | </div> |
| 123 | <div class="sect2" lang="en" xml:lang="en"> |
| 124 | <div class="titlepage"> |
| 125 | <div> |
| 126 | <div> |
| 127 | <h3 class="title"><a id="idp9323136"></a>Class</h3> |
| 128 | </div> |
| 129 | </div> |
| 130 | </div> |
| 131 | <p> |
| 132 | <a class="link" href="env.html" title="Chapter 5. The DbEnv Handle">DbEnv</a> |
| 133 | </p> |
| 134 | </div> |
| 135 | <div class="sect2" lang="en" xml:lang="en"> |
| 136 | <div class="titlepage"> |
| 137 | <div> |
| 138 | <div> |
| 139 | <h3 class="title"><a id="idp9322448"></a>See Also</h3> |
| 140 | </div> |
| 141 | </div> |
| 142 | </div> |
| 143 | <p> |
| 144 | <a class="xref" href="rep.html#replist" title="Replication and Related Methods">Replication and Related Methods</a> |
| 145 | </p> |
| 146 | </div> |
| 147 | </div> |
| 148 | <div class="navfooter"> |
| 149 | <hr /> |
| 150 | <table width="100%" summary="Navigation footer"> |
| 151 | <tr> |
| 152 | <td width="40%" align="left"><a accesskey="p" href="db_site.html">Prev</a> </td> |
| 153 | <td width="20%" align="center"> |
| 154 | <a accesskey="u" href="rep.html">Up</a> |
| 155 | </td> |
| 156 | <td width="40%" align="right"> <a accesskey="n" href="dbchannel_send_msg.html">Next</a></td> |
| 157 | </tr> |
| 158 | <tr> |
| 159 | <td width="40%" align="left" valign="top">The DbSite Handle </td> |
| 160 | <td width="20%" align="center"> |
| 161 | <a accesskey="h" href="index.html">Home</a> |
| 162 | </td> |
| 163 | <td width="40%" align="right" valign="top"> DbChannel::send_msg()</td> |
| 164 | </tr> |
| 165 | </table> |
| 166 | </div> |
| 167 | </body> |
| 168 | </html> |