Boost
C++ Libraries
...one of the most highly
regarded and expertly designed C++ library projects in the
world.
— Herb Sutter and Andrei
Alexandrescu, C++
Coding Standards
This is an older version of Boost and was released in 2023. The current version is 1.90.0.
Send a websocket close control frame.
void close( close_reason const& cr);
This function is used to send a close frame, which begins the websocket closing handshake. The session ends when both ends of the connection have sent and received a close frame. The call blocks until one of the following conditions is true:
The algorithm, known as a composed operation, is
implemented in terms of calls to the next layer's write_some
function. After beginning the closing handshake, the program should not
write further message data, pings, or pongs. Instead, the program should
continue reading message data until an error occurs. A read returning
error::closed indicates a successful
connection closure.
|
Name |
Description |
|---|---|
|
|
The reason for the close. If the close reason specifies a close
code other than |
|
Type |
Thrown On |
|---|---|
|
|
Thrown on failure. |