elephant.io icon indicating copy to clipboard operation
elephant.io copied to clipboard

Callback support in v3.0

Open SzybkiSasza opened this issue 11 years ago • 3 comments

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).

SzybkiSasza avatar Sep 08 '14 18:09 SzybkiSasza

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)

Taluu avatar Jan 30 '15 13:01 Taluu

callbacks anyone?

luciuz avatar May 26 '16 14:05 luciuz

+1

marianoarga avatar Oct 21 '16 12:10 marianoarga