Skip to content
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

Feature suggestion socket.writeFromFile #111

Open
eventengineering opened this issue Feb 13, 2020 · 0 comments
Open

Feature suggestion socket.writeFromFile #111

eventengineering opened this issue Feb 13, 2020 · 0 comments

Comments

@eventengineering
Copy link

eventengineering commented Feb 13, 2020

Been using this library for a while and, and it's great.

However, the biggest let down when using this library comes when sending files, only this isn't a problem with this library, but instead, in how ReactNative handles files, and how slow it is reading a file into the JS only to pass it back out through the TCP library to the native code behind that bit.

As such, I'm suggesting a feature.

socket.writeFromFile(filePath[, callback]) should do as it suggests, reading from the file passed, sending in the encoding specified, and calling back the callback upon completion.

It's the only potential difference from the Node.JS Net API that this library is based off, and is unfortunately a necessity to reduce file conversion overheads present in React Native.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant