diff options
author | Russell King <rmk@armlinux.org.uk> | 2021-04-16 14:01:05 +0100 |
---|---|---|
committer | Russell King <rmk@armlinux.org.uk> | 2021-04-16 14:01:05 +0100 |
commit | 9d7b0311d5948fca09b19dbe27e5f506e2e303e0 (patch) | |
tree | 1accaf615f2f744232fceed6a9a8ceca6cde7c53 /resource.h |
event-httpd: add event httpd support
Add event httpd, which is a small and basic http server designed to
provide server sent events to clients. The server accepts updates
through a simple "UPDATE" method which are then broadcast to clients
listening using the "GET" method.
Signed-off-by: Russell King <rmk@armlinux.org.uk>
Diffstat (limited to 'resource.h')
-rw-r--r-- | resource.h | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/resource.h b/resource.h new file mode 100644 index 0000000..44d0d74 --- /dev/null +++ b/resource.h @@ -0,0 +1,17 @@ +// Copyright (C) 2021 Russell King. +// Licensed under GPL version 2. See COPYING. +#ifndef RESOURCE_H +#define RESOURCE_h + +struct client; + +struct resource { + int (*get)(struct client *c, struct resource *r); + int (*update)(struct client *c, struct resource *r, const char *m); + void (*close)(struct client *c, struct resource *r); + void *data; +}; + +void resource_init(GHashTable *hash); + +#endif |