Skip to content

Missing POSIX networking headers (sys/socket.h, netinet/in.h, netdb.h) #1

@rg-net

Description

@rg-net

Priority: HIGH

Missing Headers

  • sys/socket.h - Socket creation, bind, listen, accept, connect, send, recv
  • sys/select.h - select(), fd_set, FD_* macros
  • netinet/in.h - sockaddr_in, INADDR_*, htons/ntohs
  • arpa/inet.h - inet_pton, inet_ntop, inet_addr
  • netdb.h - getaddrinfo, gethostbyname, getservbyname

Impact

Blocks any network programming - servers, clients, HTTP, DNS resolution. Critical gap for WASI compatibility since WASI has socket support.

Considerations

  • WASM/browser won't have these but WASI needs them
  • Windows requires different approach (Winsock2)
  • Can provide compile-time fencing with JACL_HAS_SOCKETS
  • Consider lightweight stubs for WASM that return ENOSYS

References

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions