Skip to content

Modernize sockets #1758

@cgay

Description

@cgay

The sockets code needs love.

  • No support for IPv6
  • The "netdb" interface (gethostbyname, gethostbyaddr) has been deprecated and should be replaced by getaddrinfo.
  • Error messages are terrible and should include strerror or at least errno in them, always. (I have a sense that the condition hierarchy is way more complex than is actually useful, but maybe I just don't grok the full genius of them yet.)
  • The documentation is pretty bare bones.
  • Tests are almost non-existent. Writing some will undoubtedly uncover other problems.

One option is to do a full rewrite and support the POSIX API, which Bruce started in https://github.com/dylan-foundry/posix-sockets I ran into Melange issues when I tried it and based on the latest commit there is probably only support for stream sockets so far.

See also the bugs labeled lib/network.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions