diff options
author | Omar Polo <op@omarpolo.com> | 2021-02-01 20:24:14 +0000 |
---|---|---|
committer | Omar Polo <op@omarpolo.com> | 2021-02-01 20:24:14 +0000 |
commit | 92da82858b6b8fe44f34e582967767d7f4d32f4d (patch) | |
tree | 5fd72709cf1c890883c653b3be93122ecce6d804 /gmid.h | |
parent | 112802ea3116b6e11a70d6060e6e238495498bbc (diff) |
document the DFA
Diffstat (limited to 'gmid.h')
-rw-r--r-- | gmid.h | 17 |
1 files changed, 17 insertions, 0 deletions
@@ -128,6 +128,23 @@ struct client; typedef void (*statefn)(struct pollfd*, struct client*); +/* + * DFA: handle_handshake is the initial state, close_conn the final. + * + * handle_handshake -> handle_open_conn + * handle_handshake -> close_conn // on err + * + * handle_open_conn -> handle_cgi // via open_file/dir/... + * handle_open_conn -> send_directory_listing // ...same + * handle_open_conn -> send_file // ...same + * handle_open_conn -> close_conn // on error + * + * handle_cgi -> close_conn + * + * send_directory_listing -> close_conn + * + * send_file -> close_conn + */ struct client { struct tls *ctx; char req[GEMINI_URL_LEN]; |