Skip to content

Conversation

philikon
Copy link
Contributor

This is a reprise of #6327, but with iOS 7.0 compatibility and less package.json changes.

Test Plan: Load WebSocketExample in UIExplorer app and start websocket test server script (both provided in #6889) and test sending binary data on both iOS and Android

@facebook-github-bot
Copy link
Contributor

By analyzing the blame information on this pull request, we identified @hharnisc, @satya164 and @kenwheeler to be potential reviewers.

@facebook-github-bot facebook-github-bot added GH Review: review-needed CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. labels Apr 13, 2016
@philikon
Copy link
Contributor Author

Note: this PR depends on (and for now includes) #6889 and #6868. So reviewers would want to focus on the last commit only. Once these PRs get merged, I'll rebase this PR.

(I miss phabricator :p)

@@ -11,114 +11,174 @@
*/
'use strict';

var RCTDeviceEventEmitter = require('RCTDeviceEventEmitter');
var RCTWebSocketModule = require('NativeModules').WebSocketModule;

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

no-undef: 'ArrayBufferView' is not defined.

@facebook-github-bot
Copy link
Contributor

@philikon updated the pull request.

var WebSocketEvent = require('WebSocketEvent');
const RCTDeviceEventEmitter = require('RCTDeviceEventEmitter');
const RCTWebSocketModule = require('NativeModules').WebSocketModule;
const Platform = require('Platform');

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

no-undef: 'ArrayBufferView' is not defined.

@facebook-github-bot
Copy link
Contributor

@philikon updated the pull request.

@philikon
Copy link
Contributor Author

Not sure what's up with the Travis failure. I've had a few other Travis builds fail last night, so perhaps Travis had some problems. Either way, I ran the e2e test locally and it passed. Maybe somebody with the right permission bits could kick Travis and restart the build.

@mkonicek
Copy link
Contributor

Wow thanks for adding the WebSocketExample and a server!

@satya164 Do the changes in WebSocket.js look good to you?

@mkonicek
Copy link
Contributor

This is quite a big rewrite - could you please also add sending strings on both Android and iOS to your test plan to make sure it doesn't break anything?

There are no breaking API changes, right?

@mkonicek
Copy link
Contributor

mkonicek commented Apr 15, 2016

Travis tests passed now, they can be a bit flaky (but much more stable than they used to be).

@philikon
Copy link
Contributor Author

This is quite a big rewrite - could you please also add sending strings on both Android and iOS to your test plan to make sure it doesn't break anything?

Please see my comment above. Most of the changes in this PR are from being based on #6889. The actual changes here are only in the last commit and I will rebase once all the dependent PRs have been merged. But with review times of O(1 week), I just wanted to move faster.

@philikon
Copy link
Contributor Author

philikon commented Apr 19, 2016

@mkonicek @christopherdro now that the other PRs have landed, I have rebased this PR here. It is ready for review now. Thanks!

@facebook-github-bot
Copy link
Contributor

@philikon updated the pull request.

// Maintain iOS 7 compatibility which doesn't have JS typed arrays.
if (typeof ArrayBuffer !== 'undefined' &&
typeof Uint8Array !== 'undefined') {
// $FlowIssue #1658

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Error suppressing comment Unused suppression

@mkonicek
Copy link
Contributor

@philikon Is this one good to go? Should I merge it? Please check the eslint warnings.

@philikon
Copy link
Contributor Author

Ah, got stung by the Flow 0.23 upgrade in the rebase. Will fix tests.

@facebook-github-bot
Copy link
Contributor

@philikon updated the pull request.

@philikon
Copy link
Contributor Author

@mkonicek Addressed your review comment and hopefully fixed Flow. Should be good to go now once CI comes back green.

@zxcpoiu
Copy link
Contributor

zxcpoiu commented Apr 19, 2016

@philikon nice job!

BTW, which version of base64-js module is required?

currently it is 0.0.8, and in #6327 they need to upgrade to 1.0.4 but have to be in sperated PR.

please take a look at #6937 and confirm.

thanks!

@philikon
Copy link
Contributor Author

philikon commented Apr 19, 2016

currently it is 0.0.8, and in #6327 they need to upgrade

They didn't need to upgrade. They just wanted to. I confirmed that it works without upgrading base64-js.

We/someone can upgrade base64-js separately if they want. Edit: I see you already did in #6937. Thanks!

@mkonicek
Copy link
Contributor

@facebook-github-bot shipit

@facebook-github-bot facebook-github-bot added GH Review: accepted Import Started This pull request has been imported. This does not imply the PR has been approved. and removed GH Review: review-needed labels Apr 20, 2016
@facebook-github-bot
Copy link
Contributor

Thanks for importing. If you are an FB employee go to Phabricator to review.

@ghost ghost closed this in ed930b4 Apr 20, 2016
@philikon
Copy link
Contributor Author

\o/

@philikon philikon deleted the ws_send_binary branch April 20, 2016 18:04
ptmt pushed a commit to ptmt/react-native that referenced this pull request May 9, 2016
Summary:This is a reprise of facebook#6327, but with iOS 7.0 compatibility and less `package.json` changes.

**Test Plan:** Load WebSocketExample in UIExplorer app and start websocket test server script (both provided in facebook#6889) and test sending binary data on both iOS and Android
Closes facebook#6961

Differential Revision: D3202022

Pulled By: mkonicek

fb-gh-sync-id: 38843d0a9c0172971c5c70a5139ded04042b280a
fbshipit-source-id: 38843d0a9c0172971c5c70a5139ded04042b280a
zebulgar pushed a commit to nightingale/react-native that referenced this pull request Jun 18, 2016
Summary:This is a reprise of facebook#6327, but with iOS 7.0 compatibility and less `package.json` changes.

**Test Plan:** Load WebSocketExample in UIExplorer app and start websocket test server script (both provided in facebook#6889) and test sending binary data on both iOS and Android
Closes facebook#6961

Differential Revision: D3202022

Pulled By: mkonicek

fb-gh-sync-id: 38843d0a9c0172971c5c70a5139ded04042b280a
fbshipit-source-id: 38843d0a9c0172971c5c70a5139ded04042b280a
bubblesunyum pushed a commit to iodine/react-native that referenced this pull request Aug 23, 2016
Summary:This is a reprise of facebook#6327, but with iOS 7.0 compatibility and less `package.json` changes.

**Test Plan:** Load WebSocketExample in UIExplorer app and start websocket test server script (both provided in facebook#6889) and test sending binary data on both iOS and Android
Closes facebook#6961

Differential Revision: D3202022

Pulled By: mkonicek

fb-gh-sync-id: 38843d0a9c0172971c5c70a5139ded04042b280a
fbshipit-source-id: 38843d0a9c0172971c5c70a5139ded04042b280a
ghost pushed a commit that referenced this pull request Sep 20, 2016
Summary:
**Motivation**
This is originally a follow up of PR #6327 by dewe and jeremyong
And mkonicek indicated this should split into a separate PR.

Now philikon takes over #6327 as #6961

**Test Plan:**
According to #6961 and #6889
Load WebSocketExample in UIExplorer app and start websocket test server script and test sending binary data on both iOS and Android
Closes #6937

Reviewed By: javache

Differential Revision: D3669596

Pulled By: mkonicek

fbshipit-source-id: 342e29eb34de882bcbd9f297aab71dd6bb236748
This pull request was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. Import Started This pull request has been imported. This does not imply the PR has been approved.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants