react-native-tcp-socket icon indicating copy to clipboard operation
react-native-tcp-socket copied to clipboard

How to reconnect immediately to the same socket instance

Open mrAlmond opened this issue 1 year ago • 3 comments

Hi,

I'm using your component to connect to an embedded device exposing a wifi interface and listening to a TCP socket. This device closes automatically the connection after 10 seconds if no traffic is made. When I was using Qt with an older application I simply reconnect to the socket when the connection was closed by the other peer and it worked, how can I did the same using this RN component? I've tried to call "connect" in the socket.on("close" event but then I wasn't able to receive any new event. Thank you for your help.

mrAlmond avatar Oct 02 '23 06:10 mrAlmond

Hi @Rapsssito please can you give me a feedback about this issue? Thank you.

mrAlmond avatar Oct 12 '23 09:10 mrAlmond

Hello, I have the same problem: I'm using your component to connect to an embedded device exposing a wifi interface and listening to a TCP socket. This device closes automatically the connection after 10 seconds if no traffic is made.

yydexiaojie avatar Dec 05 '23 03:12 yydexiaojie

@Rapsssito are you still working on this project? Can you give feedbacks, otherwise I should drop this library and proceed with some other solution because at the moment its a "no go". Thank you.

mrAlmond avatar Dec 21 '23 09:12 mrAlmond