local sockets: initial implementation

This commit is contained in:
Matheus
2024-04-13 21:00:10 -03:00
parent 2a0a32cfa3
commit 77105115f9
5 changed files with 763 additions and 9 deletions
+5 -1
View File
@@ -2,7 +2,8 @@
#include <logging.h>
static socket_t *(*createsocket[])() = {
udp_createsocket
udp_createsocket,
localsock_createsocket
};
@@ -13,6 +14,9 @@ socket_t *socket_create(int type) {
return NULL;
POLL_INITHEADER(&socket->pollheader);
socket->state = SOCKET_STATE_UNBOUND;
MUTEX_INIT(&socket->mutex);
socket->type = type;
return socket;
}