taskrambler
v0.1.8
Web server and task management solution.
|
#include <stdio.h>
#include <unistd.h>
#include <time.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <string.h>
#include <sys/types.h>
#include "class.h"
#include "stream.h"
#include "http/response.h"
#include "http/message.h"
#include "http/header.h"
#include "utils/memory.h"
#include "utils/http.h"
#include "hash.h"
#include "asset.h"
Go to the source code of this file.
Functions | |
HttpResponse | httpResponseAsset (const char *fname, size_t nfname, time_t exptime) |
A response class that delivers an asset (file on disk).
In future this will use a asset class, get from an asset class hash. The asset hash will be a shared resource between all workers.
The asset class holds an open file descriptor wich is memory mapped and is able to give the correct pointer to neede data.
This change will envolve changes in other parts of the response write system, as we no longer need to destinguish between piped and bufferd resources...we will allways work with a memory address only one time its allocated and one time a memory mapped file.
This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program. If not, see http://www.gnu.org/licenses/.
Definition in file http/response/asset.c.
HttpResponse httpResponseAsset | ( | const char * | fname, |
size_t | nfname, | ||
time_t | exptime | ||
) |
Definition at line 59 of file http/response/asset.c.
References assetPoolGet(), CSTRA, hashAdd(), and rfc1123Gmt().
Referenced by httpWorkerGetAsset().