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

fix a bug of socket.write function #128

Closed itgou closed 1 year ago

itgou commented 2 years ago

hello, when call write func with default encode utf8 and callback , I think it is more convenience to only pass to params: (buffer,cb); Nodejs also did it this way.

Rapsssito commented 2 years ago

@itgou, thanks for the PR! However, while this is correct as implementation, it must also be reflected in the type declaration file for the Typescript users. If you do not have knowledge about JSDoc, I can take your implementation and add the corresponding JSDoc.