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 a snapshot of the develop branch, built from commit c403fc694d.
PrevUpHomeNext
websocket::stream::pong (2 of 2 overloads)

Send a websocket pong control frame.

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

This function is used to send a pong frame, which is usually sent automatically in response to a ping frame from the remote peer. 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. WebSocket allows pong frames to be sent at any time, without first receiving a ping. An unsolicited pong sent in this fashion may indicate to the remote peer that the connection is still active.

Parameters

Name

Description

payload

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

ec

Set to indicate what error occurred, if any.


PrevUpHomeNext