// Copyright (C) 2021 Russell King. // Licensed under GPL version 2. See COPYING. #ifndef MINI_HTTPD_H #define MINI_HTTPD_H struct client { GSocketConnection *conn; GDataInputStream *data; GOutputStream *out; GInputStream *in; gboolean forwarded; gboolean can_chunk; int error; const char *errstr; char *method; char *uri; char *query; char *version; struct resource *resource; void *resource_data; }; void close_client(struct client *c); void respond_header(struct client *c, int error_code, const char *reason, const char *headers); void respond_chunk(struct client *c, const GString *s); #endif