Open derhuerst opened 4 years ago
From https://github.com/derhuerst/node-sockopt/blob/19410b3a048efa3bbb3f955e677e438bbdc6104d/index.js#L21-L25:
Currently _setsockopt (& _getsockopt) only handles integers. todo: fails with e.g. SO_RCVTIMEO/SO_SNDTIMEO if (!Number.isInteger(flagValue)) { throw new Error('flagValue must be an integer') }
Currently _setsockopt (& _getsockopt) only handles integers. todo: fails with e.g. SO_RCVTIMEO/SO_SNDTIMEO
_setsockopt
_getsockopt
SO_RCVTIMEO
SO_SNDTIMEO
if (!Number.isInteger(flagValue)) { throw new Error('flagValue must be an integer') }
The native code would have to be adapted to create the appropriate structs for selected flags.
struct
This could be done using shared-structs.
shared-structs
From https://github.com/derhuerst/node-sockopt/blob/19410b3a048efa3bbb3f955e677e438bbdc6104d/index.js#L21-L25:
The native code would have to be adapted to create the appropriate
struct
s for selected flags.