glowfishAPI / httpsclient-particle

An httpsclient implementation for particle.io's photon
GNU General Public License v2.0
69 stars 23 forks source link

Easy way of processing the data using a function pointer #10

Open dcalogue opened 7 years ago

dcalogue commented 7 years ago

This way we can supply the library with a function pointer where we will process the data received. This should allow anyone to use the library without modifiyng it on a per project basis.

jersey99 commented 7 years ago

Thanks for the PR. The change looks good! I will test it sometime this week, and if it works I will merge it.

jhlink commented 7 years ago

This seems so crazy stupid simple... I'll check with @jersey99 as well.

jersey99 commented 7 years ago

@jhlink What do you mean by "this seems so crazy stupid simple .."? And what do you mean by you will check with me?

jhlink commented 7 years ago

Haha, sorry @jersey99 for the miscommunication. :)

Using function pointers has never crossed my mind. This is something I've come across frequently in node, but I've never really seen it used in C++ or considered using in C++.

Instead of using "checking," I should have used "trying." I've got some extra Photons lying around, and was going to try out this PR on them. Super excited to see how function pointers will work in this library!

rlogiacco commented 5 years ago

this PR has been left pending for more than 2 years...