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

websocket::stream::ping (1 of 2 overloads)
PrevUpHomeNext

Send a WebSocket ping frame.

Synopsis
void
ping(
    ping_data const& payload);
Description

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

  • The ping frame finishes sending.
  • An error occurs on the stream.

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

Parameters

Name

Description

payload

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

Exceptions

Type

Thrown On

system_error

Thrown on failure.


PrevUpHomeNext