Callback support in v3.0
Hello, I'm trying to write simple client to test connection between different socket.io-powered apps. I would like to know how to implement callback mechanism in elephant.io v3.0, I wasn't able to find it in the code. I tried to use $client->read(), however I don't see how it could be used to intercept asynchronous messages as in v2.0 $elephant->callback() should do. What's more - using $client-read() in loop leads to program hanging on second iteration (data is read from socket PARTIALLY and then - program hangs when trying to read data again).
Hi, first thing, sorry for the delay.
The client->read() method is bugged right now (cf #74), as it stands more like a POC actually rather than a correct implementation. There is a solution, but I'm not really satisfied with it.
I'm keeping your ticket open, because there is no support yet for callbacks (especially as it depends on reading from a socket)
callbacks anyone?
+1