Mike Mintz
Mike Mintz
Okay I think I understand the issue. In addition to having to polyfill window.WebSocket, which is apparently supported via https://github.com/facebook/react-native/pull/890 , we have to replicate webpack's shims that it offers...
Yes, `react-rethinkdb` depends indirectly on `rethinkdb`. But if you use `require('react-rethinkdb')` instead of `require('react-rethinkdb/dist/node')` it will use a patched version that doesn't depend on `net` or `tls`. Which require are...
Currently on iOS, this is blocked on react-native ArrayBuffer support: - https://github.com/facebook/react-native/issues/1424 - https://github.com/facebook/react-native/pull/1829 On android, this is blocked on react-native WebSocket support: - https://github.com/facebook/react-native/issues/2837 When ArrayBuffers and WebSockets are...
@fungilation Yes I think that's the case. I saw that merge and tested it on react-native for android but turns out it was only implemented for iOS. Has anyone been...
Thanks! Let me know if you run into any issues, so far I've been able to work around everything other than "array buffer not supported on this platform"
Interesting, I guess they implemented receiving ArrayBuffers but not sending. I think the most practical way forward is to add support in rethinkdb-websocket-client and rethinkdb-websocket-server for base64 string websocket messages....
I added a base64 option to rethinkdb-websocket-client and rethinkdb-websocket-server, which works fine in the browser. Unfortunately, react-native android seems to [ignore WebSocket sub-protocols](https://github.com/facebook/react-native/blob/master/ReactAndroid/src/main/java/com/facebook/react/modules/websocket/WebSocketModule.java#L66). I just reported it as https://github.com/facebook/react-native/issues/5810. But...
If you use the latest versions (react-rethinkdb 0.5.4 and rethinkdb-websocket-server 0.3.6), you should be able to use base64 websockets by specifying `wsProtocols: ['base64']` in `RethinkSession.connect()`. @xaviercobain88 and @fungilation, could you...
I was able to test on react-native for iOS on a Mac today, and found similar missing functionality in react-native's WebSocket implementation (it doesn't expose the sub-protocols information), which I...
@GeoffreyPlitt is this resolved by your fix in https://github.com/mikemintz/rethinkdb-websocket-client/issues/9#issuecomment-237993464 ?