Header for the request-handling module. More...
#include <stdio.h>Go to the source code of this file.
Functions | |
| int | initRequestHandler (void) |
| Initializes the request-handling module. | |
| void | handleRequest (FILE *fromClient, FILE *toClient) |
| Handles requests coming from a client. | |
| void | handleInternalError (int client) |
| Handles internal server errors. | |
Header for the request-handling module.
| void handleInternalError | ( | int | client | ) |
Handles internal server errors.
This function handles internal server errors which occur before the handleRequest() function can be called. It should be called from the connection-handling module.
| client | The filedescriptor for the client connection. |
| void handleRequest | ( | FILE * | fromClient, |
| FILE * | toClient | ||
| ) |
Handles requests coming from a client.
This function does the actual work of communicating with the client. It should be called from the connection-handling module.
| fromClient | Client-connection stream opened for reading. It is the caller's responsibility to close it after this function has returned. |
| toClient | Client-connection stream opened for writing. It is the caller's responsibility to close it after this function has returned. |
| int initRequestHandler | ( | void | ) |
Initializes the request-handling module.
1.8.1.2