Skip to content

Socket API #10

@sin-ack

Description

@sin-ack

A way to expose the BSD socket API in Unix-like operating systems to Self code with the use of primitives.

  • Figure out a way to create sockaddr structs in Self memory in a way that's not super unintuitive (manually writing bytes)
  • _GetAddrInfoForHost:Port:Family:SocketType:Protocol:Flags:IfFail:
    • This one will return slots objects copied from a prototype that's defined directly in VM code. I'm thinking of hardcoding this directly for the time being, but it's clear that we are going to have more of these so having a better interface for defining objects like this would be nice.
  • _SocketWithFamily:Type:Protocol:IfFail:
  • _Connect:ToSockaddrBytes:IfFail:
  • _Bind:ToSockaddrBytes:IfFail:
  • _ListenOn:WithBacklog:IfFail:
  • _AcceptFrom:WritingDetailsTo:IfFail:
  • _Recv:BytesInto:AtOffset:From:Flags:IfFail:
  • _Send:BytesFrom:AtOffset:Into:Flags:IfFail:
  • Get rid of the FIXMEs

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions