bloomberg / bloomberg/ntf-core

please make ntsa::SocketOption::print() output include option type

Open
#254 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
C++
Stars
99
Forks
33
PR merge metrics
No merged PRs in 30d

Description

```C++
ntsa::SocketOption so1;
so1.makeLinger();

ntsa::SocketOption so2;
so2.makeZeroCopy();

std::cout << "so1=" << so1 << std::endl;
std::cout << "so2=" << so2 << std::endl;
```

outputs:
```
so1=LINGER[ enabled = false duration = (4829128, 21860576) ]
so2=0
```

If the first line of the output is actually useful to convey the option type and its value, the 2nd line is not so much. I suggest you always include both option type and the value in the string representation of `ntsa::SocketOption` values.

Contributor guide

Open the contributing guide

Research direction

Locate the implementation of ntsa::SocketOption::print() and inspect how different option types are rendered, beginning with the LINGER and zero-copy cases shown in the issue. Compare their current string representations and identify the existing tests for SocketOption formatting, if present. Done means every SocketOption string representation includes both its option type and value consistently.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
networking
Issue type
Feature
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.