Files @ 3ffeb97c88a7
Branch filter:

Location: CSY/reowolf/pseudo_socket.h - annotation

MH
Add docs for implementing infinite types in a value based language.

Since we are a value based language and do not have the concept of
pointers, then if we want to lay out the memory of datatypes we run
into a problem when the types represent recursive datastructures:
these are infinite in size. So we have an algorithm for turning
some types into pointer-like things, such that we can lay everything
out in memory.
1
2
3
4
5
6
7
8
#include <sys/socket.h> // defines {sockaddr, socklen_t}

int rw_socket(int domain, int type, int protocol);
int rw_connect(int fd, const struct sockaddr *address, socklen_t address_len);
int rw_bind(int socket, const struct sockaddr *address, socklen_t address_len);
int rw_close(int fd);
ssize_t rw_send(int fd, const void * message, size_t length, int flags);
ssize_t rw_recv(int fd, void * buffer, size_t length, int flags);