• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1<html>
2<head>
3<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
4<title>websocket::teardown (1 of 2 overloads)</title>
5<link rel="stylesheet" href="../../../../../../../doc/src/boostbook.css" type="text/css">
6<meta name="generator" content="DocBook XSL Stylesheets V1.79.1">
7<link rel="home" href="../../../index.html" title="Chapter 1. Boost.Beast">
8<link rel="up" href="../boost__beast__websocket__teardown.html" title="websocket::teardown">
9<link rel="prev" href="../boost__beast__websocket__teardown.html" title="websocket::teardown">
10<link rel="next" href="overload2.html" title="websocket::teardown (2 of 2 overloads)">
11</head>
12<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
13<table cellpadding="2" width="100%"><tr>
14<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../../boost.png"></td>
15<td align="center"><a href="../../../../../../../index.html">Home</a></td>
16<td align="center"><a href="../../../../../../../libs/libraries.htm">Libraries</a></td>
17<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td>
18<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td>
19<td align="center"><a href="../../../../../../../more/index.htm">More</a></td>
20</tr></table>
21<hr>
22<div class="spirit-nav">
23<a accesskey="p" href="../boost__beast__websocket__teardown.html"><img src="../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../boost__beast__websocket__teardown.html"><img src="../../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../../index.html"><img src="../../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="overload2.html"><img src="../../../../../../../doc/src/images/next.png" alt="Next"></a>
24</div>
25<div class="section">
26<div class="titlepage"><div><div><h5 class="title">
27<a name="beast.ref.boost__beast__websocket__teardown.overload1"></a><a class="link" href="overload1.html" title="websocket::teardown (1 of 2 overloads)">websocket::teardown
28        (1 of 2 overloads)</a>
29</h5></div></div></div>
30<p>
31          Tear down a connection.
32        </p>
33<h6>
34<a name="beast.ref.boost__beast__websocket__teardown.overload1.h0"></a>
35          <span class="phrase"><a name="beast.ref.boost__beast__websocket__teardown.overload1.synopsis"></a></span><a class="link" href="overload1.html#beast.ref.boost__beast__websocket__teardown.overload1.synopsis">Synopsis</a>
36        </h6>
37<p>
38          Defined in header <code class="literal">&lt;<a href="../../../../../../../boost/beast/websocket/teardown.hpp" target="_top">boost/beast/websocket/teardown.hpp</a>&gt;</code>
39        </p>
40<pre class="programlisting"><span class="keyword">template</span><span class="special">&lt;</span>
41    <span class="keyword">class</span> <span class="identifier">Socket</span><span class="special">&gt;</span>
42<span class="keyword">void</span>
43<span class="identifier">teardown</span><span class="special">(</span>
44    <span class="identifier">role_type</span> <span class="identifier">role</span><span class="special">,</span>
45    <span class="identifier">Socket</span><span class="special">&amp;</span> <span class="identifier">socket</span><span class="special">,</span>
46    <span class="identifier">error_code</span><span class="special">&amp;</span> <span class="identifier">ec</span><span class="special">);</span>
47</pre>
48<h6>
49<a name="beast.ref.boost__beast__websocket__teardown.overload1.h1"></a>
50          <span class="phrase"><a name="beast.ref.boost__beast__websocket__teardown.overload1.description"></a></span><a class="link" href="overload1.html#beast.ref.boost__beast__websocket__teardown.overload1.description">Description</a>
51        </h6>
52<p>
53          This tears down a connection. The implementation will call the overload
54          of this function based on the <code class="computeroutput"><span class="identifier">Socket</span></code>
55          parameter used to consruct the socket. When <code class="computeroutput"><span class="identifier">Socket</span></code>
56          is a user defined type, and not a <code class="computeroutput"><span class="identifier">net</span><span class="special">::</span><span class="identifier">ip</span><span class="special">::</span><span class="identifier">tcp</span><span class="special">::</span><span class="identifier">socket</span></code>
57          or any <code class="computeroutput"><span class="identifier">net</span><span class="special">::</span><span class="identifier">ssl</span><span class="special">::</span><span class="identifier">stream</span></code>, callers are responsible for providing
58          a suitable overload of this function.
59        </p>
60<h6>
61<a name="beast.ref.boost__beast__websocket__teardown.overload1.h2"></a>
62          <span class="phrase"><a name="beast.ref.boost__beast__websocket__teardown.overload1.parameters"></a></span><a class="link" href="overload1.html#beast.ref.boost__beast__websocket__teardown.overload1.parameters">Parameters</a>
63        </h6>
64<div class="informaltable"><table class="table">
65<colgroup>
66<col>
67<col>
68</colgroup>
69<thead><tr>
70<th>
71                  <p>
72                    Name
73                  </p>
74                </th>
75<th>
76                  <p>
77                    Description
78                  </p>
79                </th>
80</tr></thead>
81<tbody>
82<tr>
83<td>
84                  <p>
85                    <code class="computeroutput"><span class="identifier">role</span></code>
86                  </p>
87                </td>
88<td>
89                  <p>
90                    The role of the local endpoint
91                  </p>
92                </td>
93</tr>
94<tr>
95<td>
96                  <p>
97                    <code class="computeroutput"><span class="identifier">socket</span></code>
98                  </p>
99                </td>
100<td>
101                  <p>
102                    The socket to tear down.
103                  </p>
104                </td>
105</tr>
106<tr>
107<td>
108                  <p>
109                    <code class="computeroutput"><span class="identifier">ec</span></code>
110                  </p>
111                </td>
112<td>
113                  <p>
114                    Set to the error if any occurred.
115                  </p>
116                </td>
117</tr>
118</tbody>
119</table></div>
120</div>
121<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
122<td align="left"></td>
123<td align="right"><div class="copyright-footer">Copyright © 2016-2019 Vinnie
124      Falco<p>
125        Distributed under the Boost Software License, Version 1.0. (See accompanying
126        file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)
127      </p>
128</div></td>
129</tr></table>
130<hr>
131<div class="spirit-nav">
132<a accesskey="p" href="../boost__beast__websocket__teardown.html"><img src="../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../boost__beast__websocket__teardown.html"><img src="../../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../../index.html"><img src="../../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="overload2.html"><img src="../../../../../../../doc/src/images/next.png" alt="Next"></a>
133</div>
134</body>
135</html>
136