about summary refs log tree commit homepage
path: root/doc/rdoc/classes/Mongrel/HttpParser.src
diff options
context:
space:
mode:
Diffstat (limited to 'doc/rdoc/classes/Mongrel/HttpParser.src')
-rw-r--r--doc/rdoc/classes/Mongrel/HttpParser.src/M000001.html28
-rw-r--r--doc/rdoc/classes/Mongrel/HttpParser.src/M000002.html29
-rw-r--r--doc/rdoc/classes/Mongrel/HttpParser.src/M000003.html29
-rw-r--r--doc/rdoc/classes/Mongrel/HttpParser.src/M000004.html33
-rw-r--r--doc/rdoc/classes/Mongrel/HttpParser.src/M000005.html27
-rw-r--r--doc/rdoc/classes/Mongrel/HttpParser.src/M000006.html27
-rw-r--r--doc/rdoc/classes/Mongrel/HttpParser.src/M000007.html28
7 files changed, 201 insertions, 0 deletions
diff --git a/doc/rdoc/classes/Mongrel/HttpParser.src/M000001.html b/doc/rdoc/classes/Mongrel/HttpParser.src/M000001.html
new file mode 100644
index 0000000..47326b1
--- /dev/null
+++ b/doc/rdoc/classes/Mongrel/HttpParser.src/M000001.html
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="iso-8859-1"?>
+<!DOCTYPE html
+     PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+     "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+
+<html>
+<head>
+  <title>new (Mongrel::HttpParser)</title>
+  <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
+  <link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
+</head>
+<body class="standalone-code">
+  <pre>/**
+ * call-seq:
+ *    parser.new -&gt; parser
+ *
+ * Creates a new parser.
+ */
+VALUE HttpParser_init(VALUE self)
+{
+  http_parser *http = NULL;
+  DATA_GET(self, http_parser, http);
+  http_parser_init(http);
+  
+  return self;
+}</pre>
+</body>
+</html> \ No newline at end of file
diff --git a/doc/rdoc/classes/Mongrel/HttpParser.src/M000002.html b/doc/rdoc/classes/Mongrel/HttpParser.src/M000002.html
new file mode 100644
index 0000000..5ff567b
--- /dev/null
+++ b/doc/rdoc/classes/Mongrel/HttpParser.src/M000002.html
@@ -0,0 +1,29 @@
+<?xml version="1.0" encoding="iso-8859-1"?>
+<!DOCTYPE html
+     PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+     "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+
+<html>
+<head>
+  <title>reset (Mongrel::HttpParser)</title>
+  <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
+  <link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
+</head>
+<body class="standalone-code">
+  <pre>/**
+ * call-seq:
+ *    parser.reset -&gt; nil
+ *
+ * Resets the parser to it's initial state so that you can reuse it
+ * rather than making new ones.
+ */
+VALUE HttpParser_reset(VALUE self)
+{
+  http_parser *http = NULL;
+  DATA_GET(self, http_parser, http);
+  http_parser_init(http);
+  
+  return Qnil;
+}</pre>
+</body>
+</html> \ No newline at end of file
diff --git a/doc/rdoc/classes/Mongrel/HttpParser.src/M000003.html b/doc/rdoc/classes/Mongrel/HttpParser.src/M000003.html
new file mode 100644
index 0000000..7dfc546
--- /dev/null
+++ b/doc/rdoc/classes/Mongrel/HttpParser.src/M000003.html
@@ -0,0 +1,29 @@
+<?xml version="1.0" encoding="iso-8859-1"?>
+<!DOCTYPE html
+     PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+     "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+
+<html>
+<head>
+  <title>finish (Mongrel::HttpParser)</title>
+  <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
+  <link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
+</head>
+<body class="standalone-code">
+  <pre>/**
+ * call-seq:
+ *    parser.finish -&gt; true/false
+ *
+ * Finishes a parser early which could put in a &quot;good&quot; or bad state.
+ * You should call reset after finish it or bad things will happen.
+ */
+VALUE HttpParser_finish(VALUE self)
+{
+  http_parser *http = NULL;
+  DATA_GET(self, http_parser, http);
+  http_parser_finish(http);
+  
+  return http_parser_is_finished(http) ? Qtrue : Qfalse;
+}</pre>
+</body>
+</html> \ No newline at end of file
diff --git a/doc/rdoc/classes/Mongrel/HttpParser.src/M000004.html b/doc/rdoc/classes/Mongrel/HttpParser.src/M000004.html
new file mode 100644
index 0000000..9ee1f57
--- /dev/null
+++ b/doc/rdoc/classes/Mongrel/HttpParser.src/M000004.html
@@ -0,0 +1,33 @@
+<?xml version="1.0" encoding="iso-8859-1"?>
+<!DOCTYPE html
+     PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+     "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+
+<html>
+<head>
+  <title>execute (Mongrel::HttpParser)</title>
+  <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
+  <link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
+</head>
+<body class="standalone-code">
+  <pre>/**
+ * call-seq:
+ *    parser.execute(req_hash, data) -&gt; Integer
+ *
+ * Takes a Hash and a String of data, parses the String of data filling in the Hash
+ * returning an Integer to indicate how much of the data has been read.  No matter
+ * what the return value, you should call HttpParser#finished? and HttpParser#error?
+ * to figure out if it's done parsing or there was an error.
+ */
+VALUE HttpParser_execute(VALUE self, VALUE req_hash, VALUE data)
+{
+  http_parser *http = NULL;
+  DATA_GET(self, http_parser, http);
+
+  http-&gt;data = (void *)req_hash;
+  http_parser_execute(http, RSTRING(data)-&gt;ptr, RSTRING(data)-&gt;len);
+  
+  return INT2FIX(http_parser_nread(http));
+}</pre>
+</body>
+</html> \ No newline at end of file
diff --git a/doc/rdoc/classes/Mongrel/HttpParser.src/M000005.html b/doc/rdoc/classes/Mongrel/HttpParser.src/M000005.html
new file mode 100644
index 0000000..e8ebe0e
--- /dev/null
+++ b/doc/rdoc/classes/Mongrel/HttpParser.src/M000005.html
@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="iso-8859-1"?>
+<!DOCTYPE html
+     PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+     "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+
+<html>
+<head>
+  <title>error? (Mongrel::HttpParser)</title>
+  <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
+  <link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
+</head>
+<body class="standalone-code">
+  <pre>/**
+ * call-seq:
+ *    parser.error? -&gt; true/false
+ *
+ * Tells you whether the parser is in an error state.
+ */
+VALUE HttpParser_has_error(VALUE self)
+{
+  http_parser *http = NULL;
+  DATA_GET(self, http_parser, http);
+  
+  return http_parser_has_error(http) ? Qtrue : Qfalse;
+}</pre>
+</body>
+</html> \ No newline at end of file
diff --git a/doc/rdoc/classes/Mongrel/HttpParser.src/M000006.html b/doc/rdoc/classes/Mongrel/HttpParser.src/M000006.html
new file mode 100644
index 0000000..a279344
--- /dev/null
+++ b/doc/rdoc/classes/Mongrel/HttpParser.src/M000006.html
@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="iso-8859-1"?>
+<!DOCTYPE html
+     PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+     "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+
+<html>
+<head>
+  <title>finished? (Mongrel::HttpParser)</title>
+  <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
+  <link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
+</head>
+<body class="standalone-code">
+  <pre>/**
+ * call-seq:
+ *    parser.finished? -&gt; true/false
+ *
+ * Tells you whether the parser is finished or not and in a good state.
+ */
+VALUE HttpParser_is_finished(VALUE self)
+{
+  http_parser *http = NULL;
+  DATA_GET(self, http_parser, http);
+  
+  return http_parser_is_finished(http) ? Qtrue : Qfalse;
+}</pre>
+</body>
+</html> \ No newline at end of file
diff --git a/doc/rdoc/classes/Mongrel/HttpParser.src/M000007.html b/doc/rdoc/classes/Mongrel/HttpParser.src/M000007.html
new file mode 100644
index 0000000..2cfaca7
--- /dev/null
+++ b/doc/rdoc/classes/Mongrel/HttpParser.src/M000007.html
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="iso-8859-1"?>
+<!DOCTYPE html
+     PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+     "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+
+<html>
+<head>
+  <title>nread (Mongrel::HttpParser)</title>
+  <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
+  <link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
+</head>
+<body class="standalone-code">
+  <pre>/**
+ * call-seq:
+ *    parser.nread -&gt; Integer
+ *
+ * Returns the amount of data processed so far during this processing cycle.  It is
+ * set to 0 on initialize or reset calls and is incremented each time execute is called.
+ */
+VALUE HttpParser_nread(VALUE self)
+{
+  http_parser *http = NULL;
+  DATA_GET(self, http_parser, http);
+  
+  return INT2FIX(http-&gt;nread);
+}</pre>
+</body>
+</html> \ No newline at end of file