react-native/ReactAndroid
zxcpoiu 914f33c53a make protocols argument work fixes #5810 fix #6137
Summary:Hey there and thanks for submitting a pull request! Please have a look at the following checklist so that others have enough information to review your pull request:

**motivation**

WebSocket spec supports [Sec-WebSocket-Protocol](https://tools.ietf.org/html/rfc6455#section-11.3.4) as a standard way for negotiate a sub protocol between client and server.

* ios WebSocket implementation supports it.
* android WebSocket implementation ignores this header, leave a comment syas: "OkHttp will overrides it", so it did not implement.
* after some test, OkHttp doesn't override the header we add.

**Test plan (required)**

1. run and react-native app on android
2. at the main page, invoke: `var ws = new WebSocket('ws://example.ws-service.fakedomain.com', 'my-sub-protocol');`
3. see the header if it send the correct header, ex, use ngrep: `sudo ngrep -t -Wbyline -deth0 host example.ws-service.fakedomain.com and port 80`

you should see the WebSocket initial GET handshake includes header:
`Sec-WebSocke
Closes https://github.com/facebook/react-native/pull/6223

Differential Revision: D3162822

fb-gh-sync-id: a00f1c0f3e1c24ad6aa234329cbb2abad7664264
fbshipit-source-id: a00f1c0f3e1c24ad6aa234329cbb2abad7664264
2016-04-11 09:32:28 -07:00
..
libs Add BUCK files 2016-01-22 16:20:13 +00:00
src make protocols argument work fixes #5810 fix #6137 2016-04-11 09:32:28 -07:00
.npmignore Don't publish /ReactAndroid/build to npm, update version on master 2015-10-12 11:11:40 -07:00
DEFS Initialize glog in react native 2016-03-10 06:02:21 -08:00
DevExperience.md CHORE - Remove Trailing Spaces 2016-04-06 09:21:53 -07:00
README.md Clean up docs on building RN Android from source 2016-02-18 07:59:39 -08:00
build.gradle Remove stetho dependency in OSS react native's NetworkingModule 2016-03-23 12:41:24 -07:00
gradle.properties Version release script 2016-03-24 08:41:24 -07:00
release.gradle CHORE - Remove Trailing Spaces 2016-04-06 09:21:53 -07:00

README.md

Building React Native for Android

See docs on the website.