Skip to content

Feature request: ping support for detecting bad connections #21

@Sebbb

Description

@Sebbb

Hello,

this is somewhat related to #15, but not completely. I noticed that sometimes bad websocket connections aren't detected by ruby.

So, best practice would be to send a "ping" in regular intervals (ws.send(Time.now.to_i, {type: :ping })) and to do something when there is no reply.

I could implement all that in my code, but helper functions in the simple client would be great :)

Like a way to specify the ping interval, and after what time without reply something happens. E.g. it could emit a "ping_timeout" event.

Does this make sense, is that something that would be useful for more than me? :)

Thanks
Sebastian

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions