diff options
author | zedshaw <zedshaw@19e92222-5c0b-0410-8929-a290d50e31e9> | 2006-01-28 19:03:53 +0000 |
---|---|---|
committer | zedshaw <zedshaw@19e92222-5c0b-0410-8929-a290d50e31e9> | 2006-01-28 19:03:53 +0000 |
commit | 004dec2c2f44a0db510dfd65e5ffd8c9fc4ff83e (patch) | |
tree | a8b7de6debeb447af5479bf156706d09fe748ab4 /doc/rdoc/classes/Mongrel/HttpParser.src/M000004.html | |
parent | b6d34b2a4191a3118c7c70ea49349e89e581ed91 (diff) | |
download | unicorn-004dec2c2f44a0db510dfd65e5ffd8c9fc4ff83e.tar.gz |
git-svn-id: svn+ssh://rubyforge.org/var/svn/mongrel/trunk@4 19e92222-5c0b-0410-8929-a290d50e31e9
Diffstat (limited to 'doc/rdoc/classes/Mongrel/HttpParser.src/M000004.html')
-rw-r--r-- | doc/rdoc/classes/Mongrel/HttpParser.src/M000004.html | 33 |
1 files changed, 33 insertions, 0 deletions
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) -> 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->data = (void *)req_hash; + http_parser_execute(http, RSTRING(data)->ptr, RSTRING(data)->len); + + return INT2FIX(http_parser_nread(http)); +}</pre> +</body> +</html>
\ No newline at end of file |