Node server
socket.broadcast.emit('JogJointButton', data)
data = {
name: Suneeth,
age: 27
}
now im accepting this data from server in c++ client. right now my code looks like this.
sio::client io;
io.set_open_listener([&]() {
std::string nickName = "asdad";
io.socket()->emit("key", nickName);
io.socket()->on("JogJointButton", [&](sio::event& ev)
{
//Here how do i get the **data** from server
});
});
io.connect("http://localhost:8081/");
How do i accept that data inside c++. i tried ev.get_messages() but im getting some reference.
Aucun commentaire:
Enregistrer un commentaire