Closed matetuh closed 2 years ago
Hi,
A TCP socket Example depends on the language you're using but any standard socket server would work (ex: Node.js net ), just make sure the data emitted is new line delineated, from README.md
:
Ergo sum the current implementation is only suited for text data that is line delineated (Electrum server, etc..)
Future implementations will support constant streams of buffered base64 data.
Hi,
In the example there is an onion link that you can connect to via tcp and I tested this example and it works. I would just like to see an example of handling these inquiries from tcp tor.
Thank you for your reply! 👍
Hello ✋
in the Socket Usage Example tab https://github.com/Sifir-io/react-native-tor#socket-usage-example, only the client side tcp connection code example is shown. Can you provide an example of server-side code that is able to handle queries sent to the server from a client? Or can you write what package to use to handle these queries?
Additionally, I think I found a bug in the README. Because in the folder 'example / src / App.test.tsx' https://github.com/Sifir-io/react-native-tor/blob/main/example/src/App.test.tsx the method 'createTcpConnection ()' (120 lines of code) is called from the variable 'client' which is the function 'TorBridge ()' (6 lines of code). In README however, the method 'createTcpConnection ()' is called from the variable 'tor' which is a function 'Tor ()'. Is this a bug? Because i tried the code and only the one from example works.
Example TCP connection in react-native-tor: -example/src/App.test.tsx -README
Thanks 👍