Closed simonhoss closed 3 years ago
Hi
In the documentation you have the following example under https://github.com/Rapsssito/react-native-tcp-socket#server
socket.on('data', (data) => { socket.write('Echo server', data); });
I think the correct one would be the following example, because the second parameter is the encoding or a callback, right?
socket.on('data', (data) => { socket.write('Echo server ' +data); });
@simonhoss, you are right! Thanks for pointing that out.
Hi
In the documentation you have the following example under https://github.com/Rapsssito/react-native-tcp-socket#server
I think the correct one would be the following example, because the second parameter is the encoding or a callback, right?