-
Notifications
You must be signed in to change notification settings - Fork 24.4k
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
[WebSocket] Add support for binary type data (ArrayBuffer) #4483
Conversation
By analyzing the blame information on this pull request, we identified @satya164, @hharnisc and @tadeuzagallo to be potential reviewers. |
Thank you for your pull request and welcome to our community. We require contributors to sign our Contributor License Agreement, and we don't seem to have you on file. In order for us to review and merge your code, please sign up at https://code.facebook.com/cla - and if you have received this in error or have any questions, please drop us a line at [email protected]. Thanks! |
Thank you for signing our Contributor License Agreement. We can now accept your code for this (and any) Facebook open source project. Thanks! |
This just encodes the binary buffer as a string using base64. Unless the server is expecting base64-encoded data, this won't help. |
Actually, it returns an |
Woops, 👍. Is it possible to extend this for
|
@whokilledtheelectricmonk Does binary data make android crash too? |
@facebook-github-bot shipit |
Thanks for importing. If you are an FB employee go to https://our.intern.facebook.com/intern/opensource/github/pull_request/946334525447643/int_phab to review. |
This one has successfully landed internally. Will be closed once the export is fixed. |
afbff9b
…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.
…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.
…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.
Summary: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 `--binary` mode) to send some binary data to the Android UIExplorer example (also from #6889). Verified it's received correctly as `ArrayBuffer`. Closes #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
Did this add support for array buffers on android as well? |
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
Entirely based on #1829
I just updated the diff to be compatible with the current master branch.