diff options
Diffstat (limited to 'lib9p/srv_include')
-rw-r--r-- | lib9p/srv_include/lib9p/srv.h | 24 |
1 files changed, 18 insertions, 6 deletions
diff --git a/lib9p/srv_include/lib9p/srv.h b/lib9p/srv_include/lib9p/srv.h index db5be41..9b133e1 100644 --- a/lib9p/srv_include/lib9p/srv.h +++ b/lib9p/srv_include/lib9p/srv.h @@ -207,20 +207,32 @@ void lib9p_srv_accept_and_read_loop(struct lib9p_srv *srv, lo_interface net_stre * @errno L_EDOM Tversion specified an impossibly small max_msg_size * @errno L_EOPNOTSUPP T-message has an R-message type, or an unrecognized T-message type * @errno L_EBADMSG T-message has wrong size[4] for its content, or has invalid UTF-8 - * @errno L_ERANGE R-message does not fit into max_msg_size */ void lib9p_srv_read(struct lib9p_srv *srv, lo_interface net_stream_conn conn); - - /** - * In a loop, service requests to the `struct lib9p_srv *srv` argument - * that have been read by lib9p_srv_accept_and_read_loop() / - * lib9p_srv_read(). A "NULL" request causes the function to return. + * In a loop, call lib9p_srv_worker() to service requests to the + * `struct lib9p_srv *srv` argument that have been read by + * lib9p_srv_accept_and_read_loop() / lib9p_srv_read(). A "NULL" + * request causes the function to return. * * @param srv: The server configuration and state; has an associated * pool of lib9p_srv_accept_and_read_loop() coroutines. */ void lib9p_srv_worker_loop(struct lib9p_srv *srv); +/** + * You should probably not call this directly; you should probably use + * lib9p_srv_worker_loop(). + * + * Handle and send a response to a single request. + * + * @param req: The request to handle. + * + * Errors that this function itself may send to clients: + * + * @errno L_ERANGE R-message does not fit into max_msg_size + */ +void lib9p_srv_worker(struct lib9p_srv_ctx *req); + #endif /* _LIB9P_SRV_H_ */ |