Skip to content

Add suffix to protocol specific Socket methods #519

Description

@Thomasdezeeuw

We currently split all methods in different impl blocks with documentation to indicate what kind of socket level the method operates on, e.g. SOL_SOCKET or IPPROTO_IP.

However in some cases a socket option can be used with multiple protocols, e.g. IP_HDRINCL, this can lead to confusing error as seen in #517.

I propose we add a suffix to all not SOL_SOCKET methods. For example:

  • SOL_SOCKET -> none,
  • IPPROTO_IP -> _v4,
  • IPPROTO_IPV6 -> _v6,
  • IPPROTO_TCP -> _tcp,
  • IPPROTO_UDP -> _udp.

The methods will be a bit more annoying to call, but at least it will result in less errors.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions