I am using Node.js for emitting event to socket via
socket.emit(eventName[, ...args][, ack]).
On client side, an Arduino, I'm using the SocketIoClient.h library (link: https://github.com/timum-viw/socket.io-client).
So the server is sending an event and a callback function as
socket.emit("event",function(x){
console.log(x);
})
which is received on the client side in payload field as
clientSocket.on("event",event);
void event(const char * payload, size_t length);
How can I call this callback function from the client side, which is supposed to be present in the payload?