Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rework the Group's Socket Option Handling Facilities #3067

Open
maxsharabayko opened this issue Nov 7, 2024 · 0 comments
Open

Rework the Group's Socket Option Handling Facilities #3067

maxsharabayko opened this issue Nov 7, 2024 · 0 comments
Labels
[core] Area: Changes in SRT library core Type: Bug Indicates an unexpected problem or unintended behavior
Milestone

Comments

@maxsharabayko
Copy link
Collaborator

The design of the socket option handling of a group is a bit fragile with respect to data types.
The data type (optlen) returned by the API call (srt_getopt) may not match the type of the variable that stores the value.
SRTO_PBKEYLEN, SRTO_PAYLOADSIZE and SRTO_CONNTIMEO store values in a variable of a different type compared to the one coming from the API (See PR #3066). Hence the importOption function with its call to getOptDefault to get optlen and value is not error-prone.

It would be better to at least use a certain type assigned to a specific option (int32_t, int64_t, bool, char*).

This way the importOption can be improved and take the assigned static type to the option symbol instead of relying on the field's type.

@maxsharabayko maxsharabayko added Type: Bug Indicates an unexpected problem or unintended behavior [core] Area: Changes in SRT library core labels Nov 7, 2024
@maxsharabayko maxsharabayko added this to the v1.6.0 milestone Nov 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[core] Area: Changes in SRT library core Type: Bug Indicates an unexpected problem or unintended behavior
Projects
None yet
Development

No branches or pull requests

1 participant