setDataReceivedCallback

ClientSocketInterface::setDataReceivedCallback

Sets the function that will be called when data is received from the server.

Declaration

virtual void setDataReceivedCallback(std::function<void(void*, size_t)> callback) = 0;

Parameters

Name

Type

Description

callback

std::function<void(void*, size_t)>

The function that will be called when data is received from the server.

Returns

None.

Notes

Buffer can be used to efficiently parse the data received from the server.