-
Notifications
You must be signed in to change notification settings - Fork 24.5k
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 polyfill #890
WebSocket polyfill #890
Conversation
I hear you there @tptee - though the source for socket rocket already lives the the react native library. |
nice @hharnisc ! |
@tptee any particular version of SocketRocket? I just had an app accepted which is using SocketRocket 0.2.0 |
any news? |
Sorry, I've had this on the backburner for a little while. I'm just trying to figure out the best way to share the SocketRocket library between both this and the Chrome debugger, as they're both optional libraries. |
@nicklockwood understand where you're coming from. I tried a few different ways of using a shared library. Breaking it out into another project felt better than some of the other stuff I came up with. Would be great to use something like cocoapods to manage Obj-C dependencies. |
The options I've come up with so far are basically:
Option 1 is probably the most straightforward, although it means that projects that don't use WebSocket have to carry the weight of SocketRocket in their binary anyway. Option 2 doesn't really solve anything. I guess I'm leaning towards option 3, but it will be a pain to maintain such a heavily modified fork of SR. |
The decision we've come to with CocoaPods is that we want to fully support people using it, but don't want to make it mandatory. Unfortunately that eliminates it as an option for solving mutual dependencies between our first party modules. |
I'm in favor of option 1, since it minimizes the size of the codebase -- I imagine the size of the binary will have more of an impact on initial download time and minimal impact on app load time. Option 3 would be ok too but I think would be more confusing for developers (while working in the Obj-C or if they find a bug in a websocket related feature) |
Same here .. I'd prefer option 1. |
IMHO it makes sense to ship built-in WebSocket implementation, we already have XHR. |
To be honest, as an end-developer, I'm pretty OK with either way. All I want is just having the ability to develop program with WebSocket. To be more specific, I want to use Firebase. |
any idea when this might be merged in? |
ping @nicklockwood Thanks |
@lazywel sorry for the delay. Internal diff means the github pull request has been translated into a pull request in our internal repository, which is the first step to being merged in. This has now landed internally, so it should be included in the next update. |
This actually breaks the tests
|
@vjeux are you referring to the missing import in UIExplorer that@tadeuzagallo has now fixed? If so, can we close this again? |
@nicklockwood when I export the commits, all the related pull requests automatically get closed FYI :) |
Wowwwwww!! Good to see it's been merged into the master!! |
Was the |
@brysgo yeah, we messed up. We'll push up a fix shortly. |
thanks 👍 |
facebook/react-native-website#873 got merged with conflicts. Fixing it now. My bad. cc @charpeni @cpojer
window.WebSocket
which conforms with https://developer.mozilla.org/en-US/docs/Web/API/WebSocket specs