aboutsummaryrefslogtreecommitdiff
path: root/server.c
diff options
context:
space:
mode:
Diffstat (limited to 'server.c')
-rw-r--r--server.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/server.c b/server.c
index 01e82b0..a6d28fa 100644
--- a/server.c
+++ b/server.c
@@ -71,6 +71,14 @@ int server_client_close(struct server *const s, struct server_client *const c)
return ret;
}
+int server_async(struct server *const s, int (*const f)(void *),
+ void *const user)
+{
+ /* TODO: register AF_UNIX socket to server. */
+ pthread_t t;
+ pthread_create(&t, NULL, async_start, NULL);
+}
+
int server_read(void *const buf, const size_t n, struct server_client *const c)
{
const ssize_t r = read(c->fd, buf, n);