Function setPingMessage

Synopsis

#include <lib/inc/drogon/WebSocketConnection.h>

virtual void setPingMessage(const std::string &message, const std::chrono::duration< long double > &interval)=0

Description

Set the heartbeat(ping) message sent to the peer.

Parameters

message - The ping message.

interval - The sending interval.

Note
Both the server and the client in Drogon automatically send the pong message after receiving the ping message.

Source

Line 206 in lib/inc/drogon/WebSocketConnection.h.






Add Discussion as Guest

Log in