LeftHookRoll
An HTTP/1.0 compliant web server, as specified by RFC1945
Loading...
Searching...
No Matches
DataStore.hpp File Reference

A DataStore is a flexible data structure, it is either a RAM buffer or a file on disk, depending on the size of the data. you dont care about it's form, you just read/write from it using the helper functions provided. More...

#include <string>
#include <vector>
#include <sys/types.h>
#include <unistd.h>
#include <errno.h>
#include <fcntl.h>
#include <stdlib.h>
#include <sstream>
#include <algorithm>
#include <cstring>
#include <cerrno>
Include dependency graph for DataStore.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  DataStore
 

Macros

#define FILEPREFIX   "/tmp/lefthookroll_"
 
#define BUFFERLIMIT   1024 * 1024
 

Enumerations

enum  BufferMode { RAM , FILE_MODE }
 Indicates where the data is currently being stored. More...
 

Detailed Description

A DataStore is a flexible data structure, it is either a RAM buffer or a file on disk, depending on the size of the data. you dont care about it's form, you just read/write from it using the helper functions provided.

Definition in file DataStore.hpp.

Macro Definition Documentation

◆ FILEPREFIX

#define FILEPREFIX   "/tmp/lefthookroll_"

Definition at line 22 of file DataStore.hpp.

◆ BUFFERLIMIT

#define BUFFERLIMIT   1024 * 1024

Definition at line 23 of file DataStore.hpp.

Enumeration Type Documentation

◆ BufferMode

enum BufferMode

Indicates where the data is currently being stored.

Enumerator
RAM 
FILE_MODE 

Definition at line 29 of file DataStore.hpp.