Function setMessageHandler

Synopsis

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

virtual void setMessageHandler(const std::function< void(std::string &&message, const WebSocketClientPtr &, const WebSocketMessageType &)> &callback)=0

Description

Set messages handler. When a message is recieved from the server, the callback is called.

Parameters

callback - The function to call when a message is received.

Source

Line 72 in lib/inc/drogon/WebSocketClient.h.






Add Discussion as Guest

Log in