| Home | Libraries | People | FAQ | More

#### websocket::close_reason

Description of the close reason.

##### Synopsis

Defined in header `<boost/beast/websocket/rfc6455.hpp>`

    struct close_reason

##### Member Functions

Name | Description
--- | ---
close_reason [constructor] | Default constructor. — Construct from a code. — Construct from a reason string. code is `close_code::normal`. — Construct from a reason string literal. code is `close_code::normal`. — Construct from a close code and reason string.
operator bool | Returns `true` if a code was specified.

##### Data Members

Name | Description
--- | ---
code | The close code.
reason | The optional utf8-encoded reason string.

##### Description

This object stores the close code (if any) and the optional utf-8 encoded implementation defined reason string.