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

Include Winsock header only where it's actually used #1472

Merged
merged 3 commits into from
Aug 19, 2023

Commits on Aug 18, 2023

  1. Include Winsock header only where it's actually used

    pnNetCommon is also the only library that actually links with Winsock,
    so including the header elsewhere doesn't make much sense.
    dgelessus committed Aug 18, 2023
    Configuration menu
    Copy the full SHA
    6d876e8 View commit details
    Browse the repository at this point in the history
  2. Don't expect specific value for AF_INET from system headers

    Although AF_INET is always 2 on every relevant system, it's better not
    to assume this. Here, we use AF_INET only as a marker value in a
    serialization format and never pass it to any system functions, so it's
    more important that the value is consistent between systems than that it
    matches the system constant.
    dgelessus committed Aug 18, 2023
    Configuration menu
    Copy the full SHA
    afc2dc6 View commit details
    Browse the repository at this point in the history

Commits on Aug 19, 2023

  1. Add an OS-independent enum for plNetAddress families

    Only has kInet (AF_INET, IPv4) for now. This will be relevant if IPv6
    support is ever added here - unlike AF_INET, which is 2 on all relevant
    OSes, AF_INET6 has a different value on Windows, macOS, and Linux.
    dgelessus committed Aug 19, 2023
    Configuration menu
    Copy the full SHA
    7b1bee4 View commit details
    Browse the repository at this point in the history