-
Notifications
You must be signed in to change notification settings - Fork 25k
[WebSocket][android][ios parity] Add support for receiving binary type data (ArrayBuffer) #6868
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
…rayBuffer) This brings the same functionality that's already present on iOS, introduced in facebook#4483, to Android: convert binary payloads to base64 strings and send them to JS land that way, where they'll be turned into an ArrayBuffer.
|
By analyzing the blame information on this pull request, we identified @satya164, @aprock and @christopherdro to be potential reviewers. |
|
Also @mkonicek if past changes to this file are any indicator. |
|
@christopherdro #6327 is for sending binary data, while this is about receiving it. Support for receiving was already added to iOS in #4483 so all we really need here is to add a few lines to Android to make it work there too. This PR here adds those few lines. |
|
Ping? FWIW, I added a Test Plan that's easily reproducible with the UIExplorer example that I provided in #6889. |
|
Amazing, thank you @philikon! @facebook-github-bot shipit |
|
Thanks for importing. If you are an FB employee go to Phabricator to review. |
|
What's blocking this from getting merged at this point? |
|
@facebook-github-bot shipit |
|
Thanks for importing. If you are an FB employee go to Phabricator to review. |
|
@philikon The bot gets hung up sometimes. Pinging again. |
|
Thanks everyone! |
Summary:This brings the same functionality that's already present on iOS, introduced in facebook#4483, to Android: convert binary payloads to base64 strings and send them to JS land that way, where they'll be turned into an ArrayBuffer. **Test Plan:** Used test server from facebook#6889 (in `--binary` mode) to send some binary data to the Android UIExplorer example (also from facebook#6889). Verified it's received correctly as `ArrayBuffer`. Closes facebook#6868 Differential Revision: D3184797 Pulled By: mkonicek fb-gh-sync-id: e78c640c43b3e41a75ddba79acc04e5eaab5667d fbshipit-source-id: e78c640c43b3e41a75ddba79acc04e5eaab5667d
Summary:This brings the same functionality that's already present on iOS, introduced in facebook#4483, to Android: convert binary payloads to base64 strings and send them to JS land that way, where they'll be turned into an ArrayBuffer. **Test Plan:** Used test server from facebook#6889 (in `--binary` mode) to send some binary data to the Android UIExplorer example (also from facebook#6889). Verified it's received correctly as `ArrayBuffer`. Closes facebook#6868 Differential Revision: D3184797 Pulled By: mkonicek fb-gh-sync-id: e78c640c43b3e41a75ddba79acc04e5eaab5667d fbshipit-source-id: e78c640c43b3e41a75ddba79acc04e5eaab5667d
Summary:This brings the same functionality that's already present on iOS, introduced in facebook#4483, to Android: convert binary payloads to base64 strings and send them to JS land that way, where they'll be turned into an ArrayBuffer. **Test Plan:** Used test server from facebook#6889 (in `--binary` mode) to send some binary data to the Android UIExplorer example (also from facebook#6889). Verified it's received correctly as `ArrayBuffer`. Closes facebook#6868 Differential Revision: D3184797 Pulled By: mkonicek fb-gh-sync-id: e78c640c43b3e41a75ddba79acc04e5eaab5667d fbshipit-source-id: e78c640c43b3e41a75ddba79acc04e5eaab5667d
This brings the same functionality that's already present on iOS, introduced in #4483, to Android: convert binary payloads to base64 strings and send them to JS land that way, where they'll be turned into an ArrayBuffer.
Test Plan: Used test server from #6889 (in
--binarymode) to send some binary data to the Android UIExplorer example (also from #6889). Verified it's received correctly asArrayBuffer.