Update of /cvsroot/jungerl/jungerl/lib/ibrowse/doc
In directory fdv4jf1.ch3.sourceforge.com:/tmp/cvs-serv26761/doc
Modified Files:
ibrowse.html
Log Message:
ibrowse-1.5.0 - Use binaries internally. Lots of other changes. See README
Index: ibrowse.html
===================================================================
RCS file: /cvsroot/jungerl/jungerl/lib/ibrowse/doc/ibrowse.html,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -d -r1.7 -r1.8
--- ibrowse.html 21 May 2008 15:28:11 -0000 1.7
+++ ibrowse.html 1 Jul 2009 22:43:19 -0000 1.8
@@ -10,9 +10,9 @@
<h1>Module ibrowse</h1>
<ul class="index"><li><a href="#description">Description</a></li><li><a href="#index">Function Index</a></li><li><a href="#functions">Function Details</a></li></ul>The ibrowse application implements an HTTP 1.1 client.
-<p>Copyright © 2005-2008 Chandrashekhar Mullaparthi</p>
+<p>Copyright © 2005-2009 Chandrashekhar Mullaparthi</p>
-<p><b>Version:</b> 1.4</p>
+<p><b>Version:</b> 1.5.0</p>
<p><b>Behaviours:</b> <a href="gen_server.html"><tt>gen_server</tt></a>.</p>
<p><b>Authors:</b> Chandrashekhar Mullaparthi (<a href="mailto:chandrashekhar dot mullaparthi at gmail dot com"><tt>chandrashekhar dot mullaparthi at gmail dot com</tt></a>).</p>
@@ -64,7 +64,8 @@
speed achieved using only erlang has been good enough, so the
driver isn't actually used.</p>
<h2><a name="index">Function Index</a></h2>
-<table width="100%" border="1" cellspacing="0" cellpadding="2" summary="function index"><tr><td valign="top"><a href="#code_change-3">code_change/3</a></td><td></td></tr>
+<table width="100%" border="1" cellspacing="0" cellpadding="2" summary="function index"><tr><td valign="top"><a href="#all_trace_off-0">all_trace_off/0</a></td><td>Turn Off ALL tracing.</td></tr>
+<tr><td valign="top"><a href="#code_change-3">code_change/3</a></td><td></td></tr>
<tr><td valign="top"><a href="#get_config_value-1">get_config_value/1</a></td><td>Internal export.</td></tr>
<tr><td valign="top"><a href="#get_config_value-2">get_config_value/2</a></td><td>Internal export.</td></tr>
<tr><td valign="top"><a href="#handle_call-3">handle_call/3</a></td><td></td></tr>
@@ -111,44 +112,49 @@
<h2><a name="functions">Function Details</a></h2>
+<h3 class="function"><a name="all_trace_off-0">all_trace_off/0</a></h3>
+<div class="spec">
+<p><tt>all_trace_off() -> ok</tt></p>
+</div><p>Turn Off ALL tracing</p>
+
<h3 class="function"><a name="code_change-3">code_change/3</a></h3>
<div class="spec">
-<p><tt>code_change() -> term()</tt></p>
+<p><tt>code_change(OldVsn, State, Extra) -> any()</tt></p>
</div>
<h3 class="function"><a name="get_config_value-1">get_config_value/1</a></h3>
<div class="spec">
-<p><tt>get_config_value() -> term()</tt></p>
+<p><tt>get_config_value(Key) -> any()</tt></p>
</div><p>Internal export</p>
<h3 class="function"><a name="get_config_value-2">get_config_value/2</a></h3>
<div class="spec">
-<p><tt>get_config_value() -> term()</tt></p>
+<p><tt>get_config_value(Key, DefVal) -> any()</tt></p>
</div><p>Internal export</p>
<h3 class="function"><a name="handle_call-3">handle_call/3</a></h3>
<div class="spec">
-<p><tt>handle_call() -> term()</tt></p>
+<p><tt>handle_call(Request, From, State) -> any()</tt></p>
</div>
<h3 class="function"><a name="handle_cast-2">handle_cast/2</a></h3>
<div class="spec">
-<p><tt>handle_cast() -> term()</tt></p>
+<p><tt>handle_cast(Msg, State) -> any()</tt></p>
</div>
<h3 class="function"><a name="handle_info-2">handle_info/2</a></h3>
<div class="spec">
-<p><tt>handle_info() -> term()</tt></p>
+<p><tt>handle_info(Info, State) -> any()</tt></p>
</div>
<h3 class="function"><a name="init-1">init/1</a></h3>
<div class="spec">
-<p><tt>init() -> term()</tt></p>
+<p><tt>init(X1) -> any()</tt></p>
</div>
<h3 class="function"><a name="rescan_config-0">rescan_config/0</a></h3>
<div class="spec">
-<p><tt>rescan_config() -> term()</tt></p>
+<p><tt>rescan_config() -> any()</tt></p>
</div><p>Clear current configuration for ibrowse and load from the file
ibrowse.conf in the IBROWSE_EBIN/../priv directory. Current
configuration is cleared only if the ibrowse.conf file is readable
@@ -156,7 +162,7 @@
<h3 class="function"><a name="rescan_config-1">rescan_config/1</a></h3>
<div class="spec">
-<p><tt>rescan_config() -> term()</tt></p>
+<p><tt>rescan_config(File) -> any()</tt></p>
</div>
<h3 class="function"><a name="send_req-3">send_req/3</a></h3>
@@ -193,7 +199,7 @@
<div class="spec">
<p><tt>send_req(Url::string(), Headers::<a href="#type-headerList">headerList()</a>, Method::<a href="#type-method">method()</a>, Body::<a href="#type-body">body()</a>, Options::<a href="#type-optionList">optionList()</a>) -> <a href="#type-response">response()</a></tt>
<ul class="definitions"><li><tt><a name="type-optionList">optionList()</a> = [<a href="#type-option">option()</a>]</tt></li>
-<li><tt><a name="type-option">option()</a> = {max_sessions, integer()} | {max_pipeline_size, integer()} | {trace, <a href="#type-boolean">boolean()</a>} | {is_ssl, <a href="#type-boolean">boolean()</a>} | {ssl_options, [SSLOpt]} | {pool_name, atom()} | {proxy_host, string()} | {proxy_port, integer()} | {proxy_user, string()} | {proxy_password, string()} | {use_absolute_uri, <a href="#type-boolean">boolean()</a>} | {basic_auth, {<a href="#type-username">username()</a>, <a href="#type-password">password()</a>}} | {cookie, string()} | {content_length, integer()} | {content_type, string()} | {save_response_to_file, <a href="#type-srtf">srtf()</a>} | {stream_to, <a href="#type-process">process()</a>} | {http_vsn, {MajorVsn, MinorVsn}} | {host_header, string()} | {transfer_encoding, {chunked, ChunkSize}}</tt></li>
+<li><tt><a name="type-option">option()</a> = {max_sessions, integer()} | {response_format, <a href="#type-response_format">response_format()</a>} | {stream_chunk_size, integer()} | {max_pipeline_size, integer()} | {trace, <a href="#type-boolean">boolean()</a>} | {is_ssl, <a href="#type-boolean">boolean()</a>} | {ssl_options, [SSLOpt]} | {pool_name, atom()} | {proxy_host, string()} | {proxy_port, integer()} | {proxy_user, string()} | {proxy_password, string()} | {use_absolute_uri, <a href="#type-boolean">boolean()</a>} | {basic_auth, {<a href="#type-username">username()</a>, <a href="#type-password">password()</a>}} | {cookie, string()} | {content_length, integer()} | {content_type, string()} | {save_response_to_file, <a href="#type-srtf">srtf()</a>} | {stream_to, <a href="#type-process">process()</a>} | {http_vsn, {MajorVsn, MinorVsn}} | {host_header, string()} | {inactivity_timeout, integer()} | {connect_timeout, integer()} | {transfer_encoding, {chunked, ChunkSize}}</tt></li>
<li><tt><a name="type-process">process()</a> = pid() | atom()</tt></li>
<li><tt><a name="type-username">username()</a> = string()</tt></li>
<li><tt><a name="type-password">password()</a> = string()</tt></li>
@@ -201,12 +207,13 @@
<li><tt>ChunkSize = integer()</tt></li>
<li><tt><a name="type-srtf">srtf()</a> = <a href="#type-boolean">boolean()</a> | <a href="#type-filename">filename()</a></tt></li>
<li><tt><a name="type-filename">filename()</a> = string()</tt></li>
+<li><tt><a name="type-response_format">response_format()</a> = list | binary</tt></li>
</ul></p>
</div><p>Same as send_req/4.
For a description of SSL Options, look in the ssl manpage. If the
HTTP Version to use is not specified, the default is 1.1.
<br>
- <p>The <code>host_header</code> is useful in the case where ibrowse is
+ <p>The <code>host_header</code> option is useful in the case where ibrowse is
connecting to a component such as <a href="http://www.stunnel.org">stunnel</a> which then sets up a
secure connection to a webserver. In this case, the URL supplied to
ibrowse must have the stunnel host/port details, but that won't
@@ -223,7 +230,35 @@
<li>Whenever an error occurs in the processing of a request, ibrowse will return as much
information as it has, such as HTTP Status Code and HTTP Headers. When this happens, the response
is of the form <code>{error, {Reason, {stat_code, StatusCode}, HTTP_headers}}</code></li>
- </ul></p>
+
+ <li>The <code>inactivity_timeout</code> option is useful when
+ dealing with large response bodies and/or slow links. In these
+ cases, it might be hard to estimate how long a request will take to
+ complete. In such cases, the client might want to timeout if no
+ data has been received on the link for a certain time interval.</li>
+
+ <li>
+ The <code>connect_timeout</code> option is to specify how long the
+ client process should wait for connection establishment. This is
+ useful in scenarios where connections to servers are usually setup
+ very fast, but responses might take much longer compared to
+ connection setup. In such cases, it is better for the calling
+ process to timeout faster if there is a problem (DNS lookup
+ delays/failures, network routing issues, etc). The total timeout
+ value specified for the request will enforced. To illustrate using
+ an example:
+ <code>
+ ibrowse:send_req("http://www.example.com/cgi-bin/request", [], get, [], [{connect_timeout, 100}], 1000).
+ </code>
+ In the above invocation, if the connection isn't established within
+ 100 milliseconds, the request will fail with
+ <code>{error, conn_failed}</code>.<br>
+ If connection setup succeeds, the total time allowed for the
+ request to complete will be 1000 milliseconds minus the time taken
+ for connection setup.
+ </li>
+ </ul>
+ </p>
<h3 class="function"><a name="send_req-6">send_req/6</a></h3>
<div class="spec">
@@ -235,31 +270,31 @@
<h3 class="function"><a name="send_req_direct-4">send_req_direct/4</a></h3>
<div class="spec">
-<p><tt>send_req_direct() -> term()</tt></p>
+<p><tt>send_req_direct(Conn_pid, Url, Headers, Method) -> any()</tt></p>
</div><p>Same as send_req/3 except that the first argument is the PID
returned by spawn_worker_process/2 or spawn_link_worker_process/2</p>
<h3 class="function"><a name="send_req_direct-5">send_req_direct/5</a></h3>
<div class="spec">
-<p><tt>send_req_direct() -> term()</tt></p>
+<p><tt>send_req_direct(Conn_pid, Url, Headers, Method, Body) -> any()</tt></p>
</div><p>Same as send_req/4 except that the first argument is the PID
returned by spawn_worker_process/2 or spawn_link_worker_process/2</p>
<h3 class="function"><a name="send_req_direct-6">send_req_direct/6</a></h3>
<div class="spec">
-<p><tt>send_req_direct() -> term()</tt></p>
+<p><tt>send_req_direct(Conn_pid, Url, Headers, Method, Body, Options) -> any()</tt></p>
</div><p>Same as send_req/5 except that the first argument is the PID
returned by spawn_worker_process/2 or spawn_link_worker_process/2</p>
<h3 class="function"><a name="send_req_direct-7">send_req_direct/7</a></h3>
<div class="spec">
-<p><tt>send_req_direct() -> term()</tt></p>
+<p><tt>send_req_direct(Conn_pid, Url, Headers, Method, Body, Options, Timeout) -> any()</tt></p>
</div><p>Same as send_req/6 except that the first argument is the PID
returned by spawn_worker_process/2 or spawn_link_worker_process/2</p>
<h3 class="function"><a name="set_dest-3">set_dest/3</a></h3>
<div class="spec">
-<p><tt>set_dest() -> term()</tt></p>
+<p><tt>set_dest(Host, Port, T) -> any()</tt></p>
</div><p>Deprecated. Use set_max_sessions/3 and set_max_pipeline_size/3
for achieving the same effect.</p>
@@ -275,7 +310,7 @@
<h3 class="function"><a name="show_dest_status-2">show_dest_status/2</a></h3>
<div class="spec">
-<p><tt>show_dest_status() -> term()</tt></p>
+<p><tt>show_dest_status(Host, Port) -> any()</tt></p>
</div><p>Shows some internal information about load balancing to a
specified Host:Port. Info about workers spawned using
spawn_worker_process/2 or spawn_link_worker_process/2 is not
@@ -283,7 +318,7 @@
<h3 class="function"><a name="spawn_link_worker_process-2">spawn_link_worker_process/2</a></h3>
<div class="spec">
-<p><tt>spawn_link_worker_process() -> term()</tt></p>
+<p><tt>spawn_link_worker_process(Host, Port) -> any()</tt></p>
</div><p>Same as spawn_worker_process/2 except the the calling process
is linked to the worker process which is spawned.</p>
@@ -305,7 +340,7 @@
<h3 class="function"><a name="start-0">start/0</a></h3>
<div class="spec">
-<p><tt>start() -> term()</tt></p>
+<p><tt>start() -> any()</tt></p>
</div><p>Starts the ibrowse process without linking. Useful when testing using the shell</p>
<h3 class="function"><a name="start_link-0">start_link/0</a></h3>
@@ -315,7 +350,7 @@
<h3 class="function"><a name="stop-0">stop/0</a></h3>
<div class="spec">
-<p><tt>stop() -> term()</tt></p>
+<p><tt>stop() -> any()</tt></p>
</div><p>Stop the ibrowse process. Useful when testing using the shell.</p>
<h3 class="function"><a name="stop_worker_process-1">stop_worker_process/1</a></h3>
@@ -327,28 +362,28 @@
<h3 class="function"><a name="terminate-2">terminate/2</a></h3>
<div class="spec">
-<p><tt>terminate() -> term()</tt></p>
+<p><tt>terminate(Reason, State) -> any()</tt></p>
</div>
<h3 class="function"><a name="trace_off-0">trace_off/0</a></h3>
<div class="spec">
-<p><tt>trace_off() -> term()</tt></p>
+<p><tt>trace_off() -> any()</tt></p>
</div><p>Turn tracing off for the ibrowse process</p>
<h3 class="function"><a name="trace_off-2">trace_off/2</a></h3>
<div class="spec">
-<p><tt>trace_off(Host, Port) -> term()</tt></p>
+<p><tt>trace_off(Host, Port) -> ok</tt></p>
</div><p>Turn tracing OFF for all connections to the specified HTTP
server.</p>
<h3 class="function"><a name="trace_on-0">trace_on/0</a></h3>
<div class="spec">
-<p><tt>trace_on() -> term()</tt></p>
+<p><tt>trace_on() -> any()</tt></p>
</div><p>Turn tracing on for the ibrowse process</p>
<h3 class="function"><a name="trace_on-2">trace_on/2</a></h3>
<div class="spec">
-<p><tt>trace_on(Host, Port) -> term()</tt>
+<p><tt>trace_on(Host, Port) -> ok</tt>
<ul class="definitions"><li><tt>Host = string()</tt></li>
<li><tt>Port = integer()</tt></li>
</ul></p>
@@ -357,6 +392,6 @@
<hr>
<div class="navbar"><a name="#navbar_bottom"></a><table width="100%" border="0" cellspacing="0" cellpadding="2" summary="navigation bar"><tr><td><a href="overview-summary.html" target="overviewFrame">Overview</a></td><td><a href="http://www.erlang.org/"><img src="erlang.png" align="right" border="0" alt="erlang logo"></a></td></tr></table></div>
-<p><i>Generated by EDoc, Mar 27 2008, 01:20:55.</i></p>
+<p><i>Generated by EDoc, Jun 30 2009, 23:44:01.</i></p>
</body>
</html>
|