1<html> 2<head> 3<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> 4<title>websocket::close_code</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="../ref.html" title="This Page Intentionally Left Blank 2/2"> 9<link rel="prev" href="boost__beast__websocket__condition.html" title="websocket::condition"> 10<link rel="next" href="boost__beast__websocket__frame_type.html" title="websocket::frame_type"> 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__condition.html"><img src="../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../ref.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="boost__beast__websocket__frame_type.html"><img src="../../../../../../doc/src/images/next.png" alt="Next"></a> 24</div> 25<div class="section"> 26<div class="titlepage"><div><div><h4 class="title"> 27<a name="beast.ref.boost__beast__websocket__close_code"></a><a class="link" href="boost__beast__websocket__close_code.html" title="websocket::close_code">websocket::close_code</a> 28</h4></div></div></div> 29<p> 30 <a class="indexterm" name="idm46057503056704"></a> 31 </p> 32<p> 33 Close status codes. 34 </p> 35<h5> 36<a name="beast.ref.boost__beast__websocket__close_code.h0"></a> 37 <span class="phrase"><a name="beast.ref.boost__beast__websocket__close_code.synopsis"></a></span><a class="link" href="boost__beast__websocket__close_code.html#beast.ref.boost__beast__websocket__close_code.synopsis">Synopsis</a> 38 </h5> 39<p> 40 Defined in header <code class="literal"><<a href="../../../../../../boost/beast/websocket/rfc6455.hpp" target="_top">boost/beast/websocket/rfc6455.hpp</a>></code> 41 </p> 42<pre class="programlisting"><span class="keyword">enum</span> <span class="identifier">close_code</span> 43</pre> 44<h5> 45<a name="beast.ref.boost__beast__websocket__close_code.h1"></a> 46 <span class="phrase"><a name="beast.ref.boost__beast__websocket__close_code.values"></a></span><a class="link" href="boost__beast__websocket__close_code.html#beast.ref.boost__beast__websocket__close_code.values">Values</a> 47 </h5> 48<div class="informaltable"><table class="table"> 49<colgroup> 50<col> 51<col> 52</colgroup> 53<thead><tr> 54<th> 55 <p> 56 Name 57 </p> 58 </th> 59<th> 60 <p> 61 Description 62 </p> 63 </th> 64</tr></thead> 65<tbody> 66<tr> 67<td> 68 <p> 69 <code class="computeroutput"><span class="identifier">normal</span></code> 70 </p> 71 </td> 72<td> 73 <p> 74 Normal closure; the connection successfully completed whatever 75 purpose for which it was created. 76 </p> 77 </td> 78</tr> 79<tr> 80<td> 81 <p> 82 <code class="computeroutput"><span class="identifier">going_away</span></code> 83 </p> 84 </td> 85<td> 86 <p> 87 The endpoint is going away, either because of a server failure 88 or because the browser is navigating away from the page that opened 89 the connection. 90 </p> 91 </td> 92</tr> 93<tr> 94<td> 95 <p> 96 <code class="computeroutput"><span class="identifier">protocol_error</span></code> 97 </p> 98 </td> 99<td> 100 <p> 101 The endpoint is terminating the connection due to a protocol error. 102 </p> 103 </td> 104</tr> 105<tr> 106<td> 107 <p> 108 <code class="computeroutput"><span class="identifier">unknown_data</span></code> 109 </p> 110 </td> 111<td> 112 <p> 113 The connection is being terminated because the endpoint received 114 data of a type it cannot accept (for example, a text-only endpoint 115 received binary data). 116 </p> 117 </td> 118</tr> 119<tr> 120<td> 121 <p> 122 <code class="computeroutput"><span class="identifier">bad_payload</span></code> 123 </p> 124 </td> 125<td> 126 <p> 127 The endpoint is terminating the connection because a message was 128 received that contained inconsistent data (e.g., non-UTF-8 data 129 within a text message). 130 </p> 131 </td> 132</tr> 133<tr> 134<td> 135 <p> 136 <code class="computeroutput"><span class="identifier">policy_error</span></code> 137 </p> 138 </td> 139<td> 140 <p> 141 The endpoint is terminating the connection because it received 142 a message that violates its policy. This is a generic status code, 143 used when codes 1003 and 1009 are not suitable. 144 </p> 145 </td> 146</tr> 147<tr> 148<td> 149 <p> 150 <code class="computeroutput"><span class="identifier">too_big</span></code> 151 </p> 152 </td> 153<td> 154 <p> 155 The endpoint is terminating the connection because a data frame 156 was received that is too large. 157 </p> 158 </td> 159</tr> 160<tr> 161<td> 162 <p> 163 <code class="computeroutput"><span class="identifier">needs_extension</span></code> 164 </p> 165 </td> 166<td> 167 <p> 168 The client is terminating the connection because it expected the 169 server to negotiate one or more extension, but the server didn't. 170 </p> 171 </td> 172</tr> 173<tr> 174<td> 175 <p> 176 <code class="computeroutput"><span class="identifier">internal_error</span></code> 177 </p> 178 </td> 179<td> 180 <p> 181 The server is terminating the connection because it encountered 182 an unexpected condition that prevented it from fulfilling the request. 183 </p> 184 </td> 185</tr> 186<tr> 187<td> 188 <p> 189 <code class="computeroutput"><span class="identifier">service_restart</span></code> 190 </p> 191 </td> 192<td> 193 <p> 194 The server is terminating the connection because it is restarting. 195 </p> 196 </td> 197</tr> 198<tr> 199<td> 200 <p> 201 <code class="computeroutput"><span class="identifier">try_again_later</span></code> 202 </p> 203 </td> 204<td> 205 <p> 206 The server is terminating the connection due to a temporary condition, 207 e.g. it is overloaded and is casting off some of its clients. 208 </p> 209 </td> 210</tr> 211<tr> 212<td> 213 <p> 214 <code class="computeroutput"><span class="identifier">none</span></code> 215 </p> 216 </td> 217<td> 218 <p> 219 Used internally to mean "no error". 220 </p> 221 <p> 222 This code is reserved and may not be sent. 223 </p> 224 </td> 225</tr> 226<tr> 227<td> 228 <p> 229 <code class="computeroutput"><span class="identifier">reserved1</span></code> 230 </p> 231 </td> 232<td> 233 <p> 234 Reserved for future use by the WebSocket standard. 235 </p> 236 <p> 237 This code is reserved and may not be sent. 238 </p> 239 </td> 240</tr> 241<tr> 242<td> 243 <p> 244 <code class="computeroutput"><span class="identifier">no_status</span></code> 245 </p> 246 </td> 247<td> 248 <p> 249 No status code was provided even though one was expected. 250 </p> 251 <p> 252 This code is reserved and may not be sent. 253 </p> 254 </td> 255</tr> 256<tr> 257<td> 258 <p> 259 <code class="computeroutput"><span class="identifier">abnormal</span></code> 260 </p> 261 </td> 262<td> 263 <p> 264 Connection was closed without receiving a close frame. 265 </p> 266 <p> 267 This code is reserved and may not be sent. 268 </p> 269 </td> 270</tr> 271<tr> 272<td> 273 <p> 274 <code class="computeroutput"><span class="identifier">reserved2</span></code> 275 </p> 276 </td> 277<td> 278 <p> 279 Reserved for future use by the WebSocket standard. 280 </p> 281 <p> 282 This code is reserved and may not be sent. 283 </p> 284 </td> 285</tr> 286<tr> 287<td> 288 <p> 289 <code class="computeroutput"><span class="identifier">reserved3</span></code> 290 </p> 291 </td> 292<td> 293 <p> 294 Reserved for future use by the WebSocket standard. 295 </p> 296 <p> 297 This code is reserved and may not be sent. 298 </p> 299 </td> 300</tr> 301</tbody> 302</table></div> 303<h5> 304<a name="beast.ref.boost__beast__websocket__close_code.h2"></a> 305 <span class="phrase"><a name="beast.ref.boost__beast__websocket__close_code.description"></a></span><a class="link" href="boost__beast__websocket__close_code.html#beast.ref.boost__beast__websocket__close_code.description">Description</a> 306 </h5> 307<p> 308 These codes accompany close frames. 309 </p> 310<h5> 311<a name="beast.ref.boost__beast__websocket__close_code.h3"></a> 312 <span class="phrase"><a name="beast.ref.boost__beast__websocket__close_code.see_also"></a></span><a class="link" href="boost__beast__websocket__close_code.html#beast.ref.boost__beast__websocket__close_code.see_also">See Also</a> 313 </h5> 314<p> 315 <a href="https://tools.ietf.org/html/rfc6455#section-7.4.1" target="_top">RFC 6455 7.4.1 316 Defined Status Codes</a> 317 </p> 318</div> 319<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr> 320<td align="left"></td> 321<td align="right"><div class="copyright-footer">Copyright © 2016-2019 Vinnie 322 Falco<p> 323 Distributed under the Boost Software License, Version 1.0. (See accompanying 324 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>) 325 </p> 326</div></td> 327</tr></table> 328<hr> 329<div class="spirit-nav"> 330<a accesskey="p" href="boost__beast__websocket__condition.html"><img src="../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../ref.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="boost__beast__websocket__frame_type.html"><img src="../../../../../../doc/src/images/next.png" alt="Next"></a> 331</div> 332</body> 333</html> 334