+#include <assert.h>
+#include <ctype.h>
#include <stdio.h>
-#include <string.h>
#include <stdlib.h>
-#include <limits.h>
-#include <ctype.h>
-#include <assert.h>
+#include <string.h>
#include <map>
-#include <vector>
#include <string>
+#include <utility>
+#include <vector>
#include "config.h"
#include "parse.h"
using namespace std;
+#define DEFAULT_BACKLOG_SIZE 1048576
+
struct ConfigLine {
string keyword;
vector<string> arguments;
// TODO: Verify that the URL is parseable?
}
+ map<string, string>::const_iterator backlog_it = line.parameters.find("backlog_size");
+ if (backlog_it == line.parameters.end()) {
+ stream.backlog_size = DEFAULT_BACKLOG_SIZE;
+ } else {
+ stream.backlog_size = atoi(backlog_it->second.c_str());
+ }
+
// Parse marks, if so desired.
map<string, string>::const_iterator mark_parm_it = line.parameters.find("mark");
if (mark_parm_it == line.parameters.end()) {