tubesock icon indicating copy to clipboard operation
tubesock copied to clipboard

Is there a way to respond to ping messages?

Open xanguera opened this issue 8 years ago • 4 comments

Hi, I am trying to setup a connection between Tubesock and the Android library okhttp-ws. It looks like okhttp-ws sends pings but does not provide ping response mechanism. I see that Tubesock seems to have the same behavior. Although I believe ping should be sent by the server, at this point it is easier for me to hack the server than the Android app. Is there a way to enable/add support for ping messages coming into my tubesock implementation? Note, I implement it ina controller, not Rack.

Thanks!

xanguera avatar Sep 25 '17 15:09 xanguera

I'm sorry I don't know

On Sep 25, 2017 11:48 AM, "Xavier Anguera" [email protected] wrote:

Hi, I am trying to setup a connection between Tubesock and the Android library okhttp-ws. It looks like okhttp-ws sends pings but does not provide ping response mechanism. I see that Tubesock seems to have the same behavior. Although I believe ping should be sent by the server, at this point it is easier for me to hack the server than the Android app. Is there a way to enable/add support for ping messages coming into my tubesock implementation? Note, I implement it ina controller, not Rack.

Thanks!

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/ngauthier/tubesock/issues/54, or mute the thread https://github.com/notifications/unsubscribe-auth/AAA1VhVTIGCV8qx6Ftt7jTvOfsLT1OJRks5sl8s5gaJpZM4Pi8gI .

ngauthier avatar Sep 25 '17 20:09 ngauthier

Hi, I might have not placed the question correctly. My question is whether tubesock supports ping callbacks, to send a pong to the client.

xanguera avatar Sep 26 '17 10:09 xanguera

No it does not. A new type for ping and pong would need to be added here:

https://github.com/ngauthier/tubesock/blob/master/lib/tubesock.rb#L140-L145

ngauthier avatar Sep 26 '17 14:09 ngauthier

Great, thanks!

On Tue, Sep 26, 2017 at 3:04 PM, Nick Gauthier [email protected] wrote:

No it does not. A new type for ping and pong would need to be added here:

https://github.com/ngauthier/tubesock/blob/master/lib/ tubesock.rb#L140-L145

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/ngauthier/tubesock/issues/54#issuecomment-332208861, or mute the thread https://github.com/notifications/unsubscribe-auth/AJE6_Ev3B8q1Tv9SeqKZB9UTocfmUTKgks5smQR0gaJpZM4Pi8gI .

xanguera avatar Sep 26 '17 17:09 xanguera