From 5aa1d7ce7a7f236d4a4d75f60c14f4449c7aa552 Mon Sep 17 00:00:00 2001 From: Thomas Harning Jr Date: Sun, 16 Dec 2007 12:59:16 -0500 Subject: [PATCH] docs: Initial work on architecture to lay out what needs to exist --- doc/architecture.mdwn | 57 +++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 57 insertions(+) create mode 100644 doc/architecture.mdwn diff --git a/doc/architecture.mdwn b/doc/architecture.mdwn new file mode 100644 index 0000000..cf0bedd --- /dev/null +++ b/doc/architecture.mdwn @@ -0,0 +1,57 @@ +Core + dns_handler + connect_handler + output_handler + listen_handler + output_handler + input_handler + +dns_handler + new_dns_request (node, service, hints) + queue_dns_request (dr) + +connect_handler + new_connect_request (sockaddr, len) + connect_request_set_socket (fd) + connect_request_set_create_params (domain, type, protocol) + queue_connect_request (cr) + +listen_handler + new_listen_request (fd, persistent) + queue_listen_request (lr) + +output_handler + new_*_item + queue_output_request (req, fd, fdtype) + unhook_output_handler (fd, fdtype) + hook_output_handler (fd, fdtype) + +input_handler + new_*_item + queue_input_request (req, fd, fdtype) + +ior_status: + MORE - more data left to send, the hook should wait + HOLD - unhook write events (something else will rehook them up) + DONE - unqueue me + ABORT - should 'abort' all requests (kind-of-like ERROR_CLOSED except not an error) + ERROR_CLOSED - other end closed + ERROR_ERRNO - unknown error, contained in errno + ERROR_INPUT - some error obtaining the data to write + ERROR_OUTPUT - some error putting the read data to output + +[+ callback both in request-ops and in individual request to allow user handling as well as req] + +output_request: + prepare + send (fd, fdtype) : ior_status + release + +on_complete + +on_error (ior_status) : ior_status - called inside of send or prepare, (can return MORE, HOLD, DONE, ABORT) + +input_request: + prepare + recv (fd, fdtype) : ior_status + release + +on_complete + +on_error (ior_status) : ior_status - called inside of recv or prepare, (can return MORE, HOLD, DONE, ABORT) -- 2.11.4.GIT