More clear comments

Signed-off-by: Jianhui Zhao <zhaojh329@gmail.com>
main^2
Jianhui Zhao 2020-12-31 20:33:20 +08:00
parent 6da3471fc4
commit 77dd3987f9
2 changed files with 6 additions and 2 deletions

View File

@ -52,7 +52,7 @@ static void conn_done(struct uh_connection *conn)
ev_timer_stop(loop, &conn->timer);
/* This is needed for a connection requested multiple times */
/* This is needed for a connection requested multiple times on different path */
conn->handler = NULL;
}

View File

@ -99,7 +99,11 @@ struct uh_connection {
struct uh_connection *prev;
struct uh_connection *next;
void (*handler)(struct uh_connection *conn, int event);
void (*done)(struct uh_connection *conn); /* Must be called at last, if not call 'error', 'redirect' and 'serve_file' */
/*
** Indicates the end of request processing
** Must be called at last, if not call 'error', 'redirect' and 'serve_file'
*/
void (*done)(struct uh_connection *conn);
void (*send)(struct uh_connection *conn, const void *data, ssize_t len);
void (*send_file)(struct uh_connection *conn, const char *path);
void (*printf)(struct uh_connection *conn, const char *format, ...);