-
Notifications
You must be signed in to change notification settings - Fork 213
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Sending rapid commands hang #34
Comments
do not use this library for performance heavy operations. you might try out react-native-fetch-blob. They avoid the issues below by keeping everything native. As a react-native native module there are several performance bottlenecks involved in marshaling data quickly across the native/javascript boundary.
It's possible that moving to RCTEventEmitter could improve your situation, as it is likely that events are getting dropped by RN. |
update: RCTEventEmitter is simply a managing wrapper on top of RCTDeviceEventEmitter, so it's doubtful if it will improve your situation. |
You're correct. I ended up writing a NativeModule to make a class around the CocoaAsyncSocket library. Thanks for the knowledge. |
This library seems to hang when sending rapid values to a tcp server.
I'm sending various buffer arrays and awaiting on response from a tcp server. Everything works fine... but then the client.write method hangs and never resolves the callback. From the documentation it seems that the data never finished sending from the client to the server. I'm not sure how to check to see if the data is still being sent or how to resend.
All I know is client.write seems to hang after rapidly sending values... once I destroy connection and reconnect... it resolves the issue.
I can use regular 'net' module in node just fine.
The text was updated successfully, but these errors were encountered: