Skip to content

Document 'ping' and 'pong' events in http://socket.io/docs #1022

Description

@joonas-lahtinen

ping and pong events are undocumented in the website (socket.io/docs), potentially causing confusion when somebody tries to implement their own ping-pong system. socket.emit('pong') on the browser does not cause anything to be sent over the socket (verified with localStorage.debug = '*';), maybe socket.emit('ping') should also report an error letting the developer know it's a reserved keyword.

From README.md:

- `ping`. Fired when a ping packet is written out to the server.
- `pong`. Fired when a pong is received from the server.
    Parameters:
    - `Number` number of ms elapsed since `ping` packet (i.e.: latency)."

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    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