I have used react-native-tcp-socket for react native apps. I was working on a react native windows app and I tried to use react-native-tcp-socket but it was not possible to establish the connection to the server. Do you guys have any experience with TCP connection on react native windows app?
My code:
``const client = TcpSocket.createConnection(options, () => {
client.write("Hello server!");
client.destroy();
});
client.on("data", function (data) {
response = data;
});`your text`
client.on("error", function (error) {
console.log(error);
});
client.on("close", function () {
console.log("Connection closed!");
});