derhuerst / derhuerst/node-sockopt

handle non-integer flags

Open
#1 1 comment 1 reaction 0 assignees View on GitHub
bug help wanted
Dominant language
JavaScript
Stars
9
Forks
4
PR merge metrics
No merged PRs in 30d

Description

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`
>
> ```js
> if (!Number.isInteger(flagValue)) {
> throw new Error('flagValue must be an integer')
> }
> ```

The native code would have to be adapted to create the appropriate `struct`s for selected flags.

Contributor guide

No contributing guide indexed for this repository

Research direction

Start with index.js lines 21-25 and trace the native implementations of _setsockopt and _getsockopt. Determine which selected flags, including SO_RCVTIMEO and SO_SNDTIMEO, require non-integer values and appropriate structs; the work is done when those flags no longer fail the integer validation and are handled by the native code.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, node.js
Domain
networking
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.