PeelTechnologies/react-native-tcp

Invalid data, chunk must be a string or buffer, not object

Closed this issue · 1 comments

When I call the write method, an "Invalid data, chunk must be a string or buffer, not object" error appears?

Use the buffer parameter in advance in the _write method of the TcpSocket class "Let _buf = Buffer.from(buffer);" conversion and replace "else if (Buffer.isBuffer(buffer))" with "else if (Buffer.isBuffer(_buf))"