Rapsssito / react-native-tcp-socket

React Native TCP socket API for Android, iOS & macOS with SSL/TLS support.
MIT License
304 stars 80 forks source link

Different functionality from node net package when using carriage return and line feed #100

Closed EoinFalconer closed 3 years ago

EoinFalconer commented 3 years ago

Description

I am sending some ASCII messages over TCP/IP to a server. When testing with a normal node script and using the 'net' package in node.js I successfully get responses and everything works fine.

Then I go and start using it in my react native app and nothing is responding even though I am using it the same. The message is literally just a one liner as you can see below:

client.write('CCC;EAHEARTBEAT;AM1\r\n', 'ascii');

TLDR;

The above code doesn't work in react-native using this package, but it does in a node env.

Also, great package! Thank you so much for making something so easy to use!