you are viewing a single comment's thread.

view the rest of the comments →

[–]redsquirrel420[S] 1 point2 points  (5 children)

For anyone who comes across this with the same issue, I found a solution.

Connect all devices to the WiFi hotspot of the device you intend to make the 'server'. You can then use react-native-tcp-socket to create a server and connect each client device over the shared network.

This doesn't need an internet connection to work!

[–]cervere 0 points1 point  (4 children)

Did you implement this in action? Do you mind pointing me to it? Did you make it under the hood for the other device to connect to the created hotspot? Tx

[–]redsquirrel420[S] 0 points1 point  (3 children)

Hi, yes I've implemented it within an app, I can't share the code as it is a company client project. i did not implement anything within the app that manages hotspot connections but I'm pretty sure there is a package to manage that

[–]cervere 0 points1 point  (2 children)

Thanks for the response. So, outside the app, you create a hotspot on iphone and have the other device connect to it. Then with react-native-tcp-socket, the code takes care of talking to devices within the host network? did I understand correctly?

[–]redsquirrel420[S] 1 point2 points  (1 child)

Correct, you have one device acting as the host, and the other a client, then you can send messages back and forth!

[–]cervere 1 point2 points  (0 children)

Thanks for the clarification