Skip to content

Websocket .ping and .onpong missing #14855

Description

@msageryd

Websocket in RN seems to to respond correctly with a pong when ping is received (as per the Websockets spec.).

It would be great if there also where a function to send a ping and an event for knowing when pong is received.

Like this:

var ws = new WebSocket('ws://host.com/path');

ws.ping();

ws.onpong = () => {
  // pong received  
  // this socket is alive
};

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions