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 the documentation for an old version of Boost. Click here to view this page for the latest version.
PrevUpHomeNext
websocket::stream::pong (2 of 2 overloads)

Send a WebSocket pong frame.

Synopsis
void
pong(
    ping_data const& payload,
    error_code& ec);
Description

This function is used to synchronously send a pong frame on the stream. The call blocks until one of the following is true:

This function is implemented in terms of one or more calls to the next layer's write_some functions.

The WebSocket protocol allows pong frames to be sent from either end at any time. It is not necessary to first receive a ping in order to send a pong. The remote peer may use the receipt of a pong frame as an indication that the connection is not dead.

Parameters

Name

Description

payload

The payload of the pong message, which may be empty.

ec

Set to indicate what error occurred, if any.


PrevUpHomeNext