Open achingbrain opened 9 months ago
net.createServer has an optional options argument as the first parameter - https://nodejs.org/api/net.html#netcreateserveroptions-connectionlistener
net.createServer
options
This module expects the first option to be a listener:
https://github.com/Rapsssito/react-native-tcp-socket/blob/3b7ac048fc035c015caa614541570b9d7d4563b9/src/index.js#L8-L14
const server = net.connect({ noDelay: true, keepAlive: true }, () => { console.info('server started') })
An error is thrown
TypeError: The listener must be a function
The options object should be supported.
Description
net.createServer
has an optionaloptions
argument as the first parameter - https://nodejs.org/api/net.html#netcreateserveroptions-connectionlistenerThis module expects the first option to be a listener:
https://github.com/Rapsssito/react-native-tcp-socket/blob/3b7ac048fc035c015caa614541570b9d7d4563b9/src/index.js#L8-L14
Steps to reproduce
Current behavior
An error is thrown
Expected behavior
The options object should be supported.
Relevant information