mirror of
https://github.com/Mathewnd/Astral.git
synced 2026-10-29 05:38:21 +00:00
local sockets: initial implementation
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user