From 77dd3987f9a8023c65a71438a7ac4f1606acf379 Mon Sep 17 00:00:00 2001 From: Jianhui Zhao Date: Thu, 31 Dec 2020 20:33:20 +0800 Subject: [PATCH] More clear comments Signed-off-by: Jianhui Zhao --- src/connection.c | 2 +- src/connection.h | 6 +++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/src/connection.c b/src/connection.c index d3298bc..4d2e054 100644 --- a/src/connection.c +++ b/src/connection.c @@ -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; } diff --git a/src/connection.h b/src/connection.h index ed43a6b..9ec6bb9 100644 --- a/src/connection.h +++ b/src/connection.h @@ -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, ...);