react-native/Libraries/WebSocket
danielbasedow 4ac4f86bf5 Add ping to WebSocket
Summary:
Idle WebSocket connections get reset after a few minutes of inactivity. To prevent this, most WebSocket implementations offer sending special ping messages. This PR adds a method `sendPing()` to  WebSocket. Ping payloads are not supported.

Manual testing can be done by adding `connection.on('ping', _ => console.log('Received ping'));` to a ws connection or using a packet sniffer while sending pings.
Closes https://github.com/facebook/react-native/pull/8505

Differential Revision: D3516260

Pulled By: dmmiller

fbshipit-source-id: cfebf5899188ae53254d5be6b666a9075e0eed89
2016-07-05 05:58:23 -07:00
..
RCTWebSocket.xcodeproj Fix OSS iOS build 2016-02-17 07:38:33 -08:00
__mocks__ Fix WebSocket compatibility with event-target-shim ^1.0.5 2016-04-27 12:26:23 -07:00
__tests__ Update Jest APIs on fbsource 2016-04-27 19:16:32 -07:00
RCTSRWebSocket.h Backed out changeset 183744d2415b 2016-03-15 11:49:28 -07:00
RCTSRWebSocket.m Fix the Origin: header used in WebSocket requests. 2016-06-03 15:13:41 -07:00
RCTWebSocketExecutor.h Refactored module access to allow for lazy loading 2015-11-25 04:49:45 -08:00
RCTWebSocketExecutor.m Changed the host for RCTWebSocketExecutor to the one retrieved from the bridge. 2016-06-13 13:28:28 -07:00
RCTWebSocketManager.h Enable persistent socket between packager and bridge (1/N). 2016-02-16 23:05:36 -08:00
RCTWebSocketManager.m Reconnect RCTWebSocketManager when packager restarts 2016-06-20 10:58:32 -07:00
RCTWebSocketModule.h Updated Websocket to use new event system 2016-05-12 08:30:24 -07:00
RCTWebSocketModule.m Add ping to WebSocket 2016-07-05 05:58:23 -07:00
WebSocket.js Add ping to WebSocket 2016-07-05 05:58:23 -07:00
WebSocketEvent.js Implement WebSocket module for Android. Fixes #2837 2015-10-07 08:36:22 -07:00