Closed angel1st closed 7 years ago
Hi, Thanks for contacting me and looking into my library.
yes, the command to send data to the server is send, not emit I didnt want to mix it up with emit and broadcast
when you send data from the server, you get the data via
if (client.monitor()) // this will receive the data { Serial.println(RID); //this is the ID of the reply if (RID == "atime" && Rname == "time") { Serial.print("Il est "); Serial.println(Rcontent); } }
so, you can easily make the same .on with any switch case or if else... depending on your project and your need
let me know if that answers your questions
I see thanks, @washo4evr it should work, I guess. Nevertheless - if you have to create Socket.io client lib, which follows typical socket.io client workflow, I would suggest to stick to the above methods. Best Regards, Angel
Hi there, First of all - I thanks for spending time and creating this library. I simply took a look at it, but since I have already background experience with socket.io from other projects, I was expecting to see at least two key methods:
emit
- the one which is used to send the message to the server. I guess in your casesend
is the substitute, correct?on
- this is callback method allows client to receive messages from the server. This one I totally missed.I would appreciate if you can elaborate on the above and let me know how your lib actually implements those two key socket.io methods.
Thanks, Angel