Open KoalaSat opened 1 year ago
we discussed to create a CRUD endpoint for this
This is referring to the only part of the app that is WebSockets only, the chat, right? I link here the relevant thread https://github.com/Reckless-Satoshi/robosats/issues/175
If WebSockets were possible we could create a new notification consumer for push notifications.
Let's make implementing WebSockets over Tor on Android a rewarded task. It is unclear the amount of time and effort needed so let's make it a "range" reward and decide the specific amount as a solution becomes more clearer. ⚡ 400K - 1M Sats ⚡ Shall I assign you?
Shall I assign you?
Sorry I missed the last time this last sentence, yeah, I'll work on it right after we close the persist data issue
ok so bad news, given the actual implementation of react-native-tor websockets are not possible. They implemented a TCP connection for an specific request made by Bluewallet, but their goal was to use it to connect to Electrum. I was too ingenious to believe a websocket was just a TCP connection with steroids, it's not, and this post explains it very well https://stackoverflow.com/questions/14928222/tcp-socket-to-websocket
Is your feature request related to a problem? Please describe. As part of the Android first functional apk, we want to be able to create websockets with the server trough the Tor network.
Describe the solution you'd like Extend
ApiWebClient
andApiNativeClient
to be used for creating socketsSystemWebClient
: It contains the actual sockets connection implementationSystemNativeClient
: It uses the Native client to create the socket connection. We need to be careful here, so far Native connection has been always initiated on the web app, but this time the message might be (or not) initiated on the server side, so for this case we need to implement a publish-subscribe pattern.Describe alternatives you've considered On the case it's not possible to create sockets with the Tor library, we discussed to create a CRUD endpoint for this.
Additional context