115 lines
42 KiB
HTML
115 lines
42 KiB
HTML
<!DOCTYPE html>
|
|
<html lang="en">
|
|
<head>
|
|
<title>Documentation</title>
|
|
<meta charset="utf-8" />
|
|
<meta content="width=device-width, initial-scale=1" name="viewport" />
|
|
<link href="style.css" rel="stylesheet" />
|
|
<script src="script.js" type="text/javascript"></script>
|
|
|
|
|
|
<link href="search-results.html" rel="prefetch" />
|
|
</head>
|
|
<body>
|
|
<div id="page-header">
|
|
<div id="logotype">
|
|
<span>Documentation</span>
|
|
<nav>
|
|
<a href="http://dlang.org/">Dlang.org</a>
|
|
</nav>
|
|
</div>
|
|
|
|
<form action="search-docs.html" id="search">
|
|
<input name="searchTerm" placeholder="Find a symbol name..." type="search" />
|
|
<input type="submit" value="Go" />
|
|
</form>
|
|
</div>
|
|
<div id="page-body">
|
|
<div id="page-content">
|
|
</div>
|
|
<div id="page-nav">
|
|
</div>
|
|
</div>
|
|
<div id="page-footer">Page generated by <a href="https://github.com/adamdruppe/adrdox">adrdox</a></div>
|
|
|
|
<script type="text/xml" id="search-index-container">
|
|
<adrdox>
|
|
<listing>
|
|
<decl id="1" type="module"><name>handy_http_transport.http1.task_pool</name><desc><div><span class="undocumented-note">Undocumented in source.</span></div></desc><link>handy_http_transport.http1.task_pool.html</link><decl id="2" type="struct"><name>Http1TransportConfig</name><desc><div><p>Configuration options to provide when creating a new Http1Transport
|
|
instance.</p></div></desc><link>handy_http_transport.http1.task_pool.Http1TransportConfig.html</link><decl id="3" type="variable"><name>host</name><desc><div><p>The host address to bind to.</p></div></desc><link>handy_http_transport.http1.task_pool.Http1TransportConfig.host.html</link></decl><decl id="4" type="variable"><name>port</name><desc><div><p>The port to bind to.</p></div></desc><link>handy_http_transport.http1.task_pool.Http1TransportConfig.port.html</link></decl><decl id="5" type="variable"><name>workerCount</name><desc><div><p>The number of workers to use in the task pool.</p></div></desc><link>handy_http_transport.http1.task_pool.Http1TransportConfig.workerCount.html</link></decl></decl><decl id="6" type="function"><name>defaultConfig</name><desc><div><p>Defines the default configuration options if none are provided. They are:
|
|
* Host address 127.0.0.1
|
|
* Port 8080
|
|
* Worker count of 5.</p></div></desc><link>handy_http_transport.http1.task_pool.defaultConfig.html</link></decl><decl id="7" type="class"><name>TaskPoolHttp1Transport</name><desc><div><p>An implementation of Http1Transport which uses D's standard library
|
|
parallelization, where each incoming client request is turned into a task
|
|
and submitted to the standard task pool.</p></div></desc><link>handy_http_transport.http1.task_pool.TaskPoolHttp1Transport.html</link><decl id="8" type="constructor"><name>this</name><desc><div><p>Creates a new transport instance using a std.parallelism TaskPool for
|
|
handling requests.</p></div></desc><link>handy_http_transport.http1.task_pool.TaskPoolHttp1Transport.this.html</link></decl><decl id="9" type="function"><name>runServer</name><desc><div><span class="undocumented-note">Undocumented in source. Be warned that the author may not have intended to support it.</span></div></desc><link>handy_http_transport.http1.task_pool.TaskPoolHttp1Transport.runServer.html</link></decl><decl id="10" type="function"><name>stop</name><desc><div><span class="undocumented-note">Undocumented in source. Be warned that the author may not have intended to support it.</span></div></desc><link>handy_http_transport.http1.task_pool.TaskPoolHttp1Transport.stop.html</link></decl></decl></decl><decl id="11" type="module"><name>handy_http_transport.http1.photon</name><desc><div><span class="undocumented-note">Undocumented in source.</span></div></desc><link>handy_http_transport.http1.photon.html</link><decl id="12" type="class"><name>PhotonHttp1Transport</name><desc><div><p>An implementation of Http1Transport which uses Dimitry Olshansky's Photon
|
|
library for asynchronous task processing. A main fiber is started which
|
|
accepts incoming client sockets, and a fiber is spawned for each client so
|
|
its request can be handled asynchronously.</p></div></desc><link>handy_http_transport.http1.photon.PhotonHttp1Transport.html</link><decl id="13" type="constructor"><name>this</name><desc><div><span class="undocumented-note">Undocumented in source.</span></div></desc><link>handy_http_transport.http1.photon.PhotonHttp1Transport.this.html</link></decl><decl id="14" type="function"><name>runServer</name><desc><div><span class="undocumented-note">Undocumented in source. Be warned that the author may not have intended to support it.</span></div></desc><link>handy_http_transport.http1.photon.PhotonHttp1Transport.runServer.html</link></decl><decl id="15" type="function"><name>stop</name><desc><div><span class="undocumented-note">Undocumented in source. Be warned that the author may not have intended to support it.</span></div></desc><link>handy_http_transport.http1.photon.PhotonHttp1Transport.stop.html</link></decl></decl></decl><decl id="16" type="module"><name>handy_http_transport.http1</name><desc><div><p>This package defines the Handy-Http implementation of HTTP/1.1.</p></div></desc><link>handy_http_transport.http1.html</link><decl id="17" type="module"><name>handy_http_transport.http1.task_pool</name><desc><div><span class="undocumented-note">Undocumented in source.</span></div></desc><link>handy_http_transport.http1.task_pool.html</link><decl id="18" type="struct"><name>Http1TransportConfig</name><desc><div><p>Configuration options to provide when creating a new Http1Transport
|
|
instance.</p></div></desc><link>handy_http_transport.http1.task_pool.Http1TransportConfig.html</link><decl id="19" type="variable"><name>host</name><desc><div><p>The host address to bind to.</p></div></desc><link>handy_http_transport.http1.task_pool.Http1TransportConfig.host.html</link></decl><decl id="20" type="variable"><name>port</name><desc><div><p>The port to bind to.</p></div></desc><link>handy_http_transport.http1.task_pool.Http1TransportConfig.port.html</link></decl><decl id="21" type="variable"><name>workerCount</name><desc><div><p>The number of workers to use in the task pool.</p></div></desc><link>handy_http_transport.http1.task_pool.Http1TransportConfig.workerCount.html</link></decl></decl><decl id="22" type="function"><name>defaultConfig</name><desc><div><p>Defines the default configuration options if none are provided. They are:
|
|
* Host address 127.0.0.1
|
|
* Port 8080
|
|
* Worker count of 5.</p></div></desc><link>handy_http_transport.http1.task_pool.defaultConfig.html</link></decl><decl id="23" type="class"><name>TaskPoolHttp1Transport</name><desc><div><p>An implementation of Http1Transport which uses D's standard library
|
|
parallelization, where each incoming client request is turned into a task
|
|
and submitted to the standard task pool.</p></div></desc><link>handy_http_transport.http1.task_pool.TaskPoolHttp1Transport.html</link><decl id="24" type="constructor"><name>this</name><desc><div><p>Creates a new transport instance using a std.parallelism TaskPool for
|
|
handling requests.</p></div></desc><link>handy_http_transport.http1.task_pool.TaskPoolHttp1Transport.this.html</link></decl><decl id="25" type="function"><name>runServer</name><desc><div><span class="undocumented-note">Undocumented in source. Be warned that the author may not have intended to support it.</span></div></desc><link>handy_http_transport.http1.task_pool.TaskPoolHttp1Transport.runServer.html</link></decl><decl id="26" type="function"><name>stop</name><desc><div><span class="undocumented-note">Undocumented in source. Be warned that the author may not have intended to support it.</span></div></desc><link>handy_http_transport.http1.task_pool.TaskPoolHttp1Transport.stop.html</link></decl></decl></decl><decl id="27" type="module"><name>handy_http_transport.http1.photon</name><desc><div><span class="undocumented-note">Undocumented in source.</span></div></desc><link>handy_http_transport.http1.photon.html</link><decl id="28" type="class"><name>PhotonHttp1Transport</name><desc><div><p>An implementation of Http1Transport which uses Dimitry Olshansky's Photon
|
|
library for asynchronous task processing. A main fiber is started which
|
|
accepts incoming client sockets, and a fiber is spawned for each client so
|
|
its request can be handled asynchronously.</p></div></desc><link>handy_http_transport.http1.photon.PhotonHttp1Transport.html</link><decl id="29" type="constructor"><name>this</name><desc><div><span class="undocumented-note">Undocumented in source.</span></div></desc><link>handy_http_transport.http1.photon.PhotonHttp1Transport.this.html</link></decl><decl id="30" type="function"><name>runServer</name><desc><div><span class="undocumented-note">Undocumented in source. Be warned that the author may not have intended to support it.</span></div></desc><link>handy_http_transport.http1.photon.PhotonHttp1Transport.runServer.html</link></decl><decl id="31" type="function"><name>stop</name><desc><div><span class="undocumented-note">Undocumented in source. Be warned that the author may not have intended to support it.</span></div></desc><link>handy_http_transport.http1.photon.PhotonHttp1Transport.stop.html</link></decl></decl></decl><decl id="32" type="module"><name>handy_http_transport.http1.epoll</name><desc><div><span class="undocumented-note">Undocumented in source.</span></div></desc><link>handy_http_transport.http1.epoll.html</link><decl id="33" type="function"><name>accept4</name><desc><div><span class="undocumented-note">Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.</span></div></desc><link>handy_http_transport.http1.epoll.accept4.html</link></decl><decl id="34" type="class"><name>Http1EpollTransport</name><desc><div><span class="undocumented-note">Undocumented in source.</span></div></desc><link>handy_http_transport.http1.epoll.Http1EpollTransport.html</link><decl id="35" type="constructor"><name>this</name><desc><div><span class="undocumented-note">Undocumented in source.</span></div></desc><link>handy_http_transport.http1.epoll.Http1EpollTransport.this.html</link></decl><decl id="36" type="function"><name>start</name><desc><div><span class="undocumented-note">Undocumented in source. Be warned that the author may not have intended to support it.</span></div></desc><link>handy_http_transport.http1.epoll.Http1EpollTransport.start.html</link></decl></decl></decl><decl id="37" type="module"><name>handy_http_transport.http1.transport</name><desc><div><span class="undocumented-note">Undocumented in source.</span></div></desc><link>handy_http_transport.http1.transport.html</link><decl id="38" type="class"><name>Http1Transport</name><desc><div><p>Base class for HTTP/1.1 transport, where different subclasses can define
|
|
how the actual socket communication works (threadpool / epoll/ etc).</p></div></desc><link>handy_http_transport.http1.transport.Http1Transport.html</link><decl id="39" type="variable"><name>requestHandler</name><desc><div><span class="undocumented-note">Undocumented in source.</span></div></desc><link>handy_http_transport.http1.transport.Http1Transport.requestHandler.html</link></decl><decl id="40" type="variable"><name>port</name><desc><div><span class="undocumented-note">Undocumented in source.</span></div></desc><link>handy_http_transport.http1.transport.Http1Transport.port.html</link></decl><decl id="41" type="constructor"><name>this</name><desc><div><span class="undocumented-note">Undocumented in source.</span></div></desc><link>handy_http_transport.http1.transport.Http1Transport.this.html</link></decl><decl id="42" type="function"><name>isRunning</name><desc><div><span class="undocumented-note">Undocumented in source. Be warned that the author may not have intended to support it.</span></div></desc><link>handy_http_transport.http1.transport.Http1Transport.isRunning.html</link></decl><decl id="43" type="function"><name>start</name><desc><div><span class="undocumented-note">Undocumented in source. Be warned that the author may not have intended to support it.</span></div></desc><link>handy_http_transport.http1.transport.Http1Transport.start.html</link></decl><decl id="44" type="function"><name>runServer</name><desc><div><span class="undocumented-note">Undocumented in source.</span></div></desc><link>handy_http_transport.http1.transport.Http1Transport.runServer.html</link></decl><decl id="45" type="function"><name>stop</name><desc><div><span class="undocumented-note">Undocumented in source. Be warned that the author may not have intended to support it.</span></div></desc><link>handy_http_transport.http1.transport.Http1Transport.stop.html</link></decl></decl><decl id="46" type="function"><name>testHttp1Transport</name><desc><div><p>A generic test to ensure that any Http1Transport implementation behaves
|
|
properly to start &amp; stop, and process requests when running.</p></div></desc><link>handy_http_transport.http1.transport.testHttp1Transport.html</link></decl><decl id="47" type="function"><name>handleClient</name><desc><div><p>The main logic for handling an incoming request from a client. It involves
|
|
reading bytes from the client, parsing them as an HTTP request, passing that
|
|
to the HTTP Transport's request handler, and then writing the response back
|
|
to the client.</p></div></desc><link>handy_http_transport.http1.transport.handleClient.html</link></decl><decl id="48" type="function"><name>getAddress</name><desc><div><p>Gets a ClientAddress value from a socket's address information.</p></div></desc><link>handy_http_transport.http1.transport.getAddress.html</link></decl><decl id="49" type="alias"><name>HttpRequestParseResult</name><desc><div><p>Alias for the result of the <tt class="inline-code">readHttpRequest</tt> function which parses HTTP requests.</p></div></desc><link>handy_http_transport.http1.transport.HttpRequestParseResult.html</link></decl><decl id="50" type="function"><name>readHttpRequest</name><desc><div><p>Parses an HTTP/1.1 request from a byte input stream.</p></div></desc><link>handy_http_transport.http1.transport.readHttpRequest.html</link></decl><decl id="51" type="function"><name>parseHeaders</name><desc><div><p>Parses HTTP headers from an input stream, and returns them as an associative
|
|
array mapping header names to their list of values.</p></div></desc><link>handy_http_transport.http1.transport.parseHeaders.html</link></decl></decl></decl><decl id="52" type="module"><name>handy_http_transport.http1.epoll</name><desc><div><span class="undocumented-note">Undocumented in source.</span></div></desc><link>handy_http_transport.http1.epoll.html</link><decl id="53" type="function"><name>accept4</name><desc><div><span class="undocumented-note">Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.</span></div></desc><link>handy_http_transport.http1.epoll.accept4.html</link></decl><decl id="54" type="class"><name>Http1EpollTransport</name><desc><div><span class="undocumented-note">Undocumented in source.</span></div></desc><link>handy_http_transport.http1.epoll.Http1EpollTransport.html</link><decl id="55" type="constructor"><name>this</name><desc><div><span class="undocumented-note">Undocumented in source.</span></div></desc><link>handy_http_transport.http1.epoll.Http1EpollTransport.this.html</link></decl><decl id="56" type="function"><name>start</name><desc><div><span class="undocumented-note">Undocumented in source. Be warned that the author may not have intended to support it.</span></div></desc><link>handy_http_transport.http1.epoll.Http1EpollTransport.start.html</link></decl></decl></decl><decl id="57" type="module"><name>handy_http_transport.http1.transport</name><desc><div><span class="undocumented-note">Undocumented in source.</span></div></desc><link>handy_http_transport.http1.transport.html</link><decl id="58" type="class"><name>Http1Transport</name><desc><div><p>Base class for HTTP/1.1 transport, where different subclasses can define
|
|
how the actual socket communication works (threadpool / epoll/ etc).</p></div></desc><link>handy_http_transport.http1.transport.Http1Transport.html</link><decl id="59" type="variable"><name>requestHandler</name><desc><div><span class="undocumented-note">Undocumented in source.</span></div></desc><link>handy_http_transport.http1.transport.Http1Transport.requestHandler.html</link></decl><decl id="60" type="variable"><name>port</name><desc><div><span class="undocumented-note">Undocumented in source.</span></div></desc><link>handy_http_transport.http1.transport.Http1Transport.port.html</link></decl><decl id="61" type="constructor"><name>this</name><desc><div><span class="undocumented-note">Undocumented in source.</span></div></desc><link>handy_http_transport.http1.transport.Http1Transport.this.html</link></decl><decl id="62" type="function"><name>isRunning</name><desc><div><span class="undocumented-note">Undocumented in source. Be warned that the author may not have intended to support it.</span></div></desc><link>handy_http_transport.http1.transport.Http1Transport.isRunning.html</link></decl><decl id="63" type="function"><name>start</name><desc><div><span class="undocumented-note">Undocumented in source. Be warned that the author may not have intended to support it.</span></div></desc><link>handy_http_transport.http1.transport.Http1Transport.start.html</link></decl><decl id="64" type="function"><name>runServer</name><desc><div><span class="undocumented-note">Undocumented in source.</span></div></desc><link>handy_http_transport.http1.transport.Http1Transport.runServer.html</link></decl><decl id="65" type="function"><name>stop</name><desc><div><span class="undocumented-note">Undocumented in source. Be warned that the author may not have intended to support it.</span></div></desc><link>handy_http_transport.http1.transport.Http1Transport.stop.html</link></decl></decl><decl id="66" type="function"><name>testHttp1Transport</name><desc><div><p>A generic test to ensure that any Http1Transport implementation behaves
|
|
properly to start &amp; stop, and process requests when running.</p></div></desc><link>handy_http_transport.http1.transport.testHttp1Transport.html</link></decl><decl id="67" type="function"><name>handleClient</name><desc><div><p>The main logic for handling an incoming request from a client. It involves
|
|
reading bytes from the client, parsing them as an HTTP request, passing that
|
|
to the HTTP Transport's request handler, and then writing the response back
|
|
to the client.</p></div></desc><link>handy_http_transport.http1.transport.handleClient.html</link></decl><decl id="68" type="function"><name>getAddress</name><desc><div><p>Gets a ClientAddress value from a socket's address information.</p></div></desc><link>handy_http_transport.http1.transport.getAddress.html</link></decl><decl id="69" type="alias"><name>HttpRequestParseResult</name><desc><div><p>Alias for the result of the <tt class="inline-code">readHttpRequest</tt> function which parses HTTP requests.</p></div></desc><link>handy_http_transport.http1.transport.HttpRequestParseResult.html</link></decl><decl id="70" type="function"><name>readHttpRequest</name><desc><div><p>Parses an HTTP/1.1 request from a byte input stream.</p></div></desc><link>handy_http_transport.http1.transport.readHttpRequest.html</link></decl><decl id="71" type="function"><name>parseHeaders</name><desc><div><p>Parses HTTP headers from an input stream, and returns them as an associative
|
|
array mapping header names to their list of values.</p></div></desc><link>handy_http_transport.http1.transport.parseHeaders.html</link></decl></decl><decl id="72" type="module"><name>handy_http_transport.response_output_stream</name><desc><div><span class="undocumented-note">Undocumented in source.</span></div></desc><link>handy_http_transport.response_output_stream.html</link><decl id="73" type="struct"><name>HttpResponseOutputStream</name><desc><div><p>A wrapper around a byte output stream that's used for writing HTTP response
|
|
content. It keeps a reference to the <tt class="inline-code">ServerHttpResponse</tt> so that when a
|
|
handler writes data to the stream, it'll flush the HTTP response status and
|
|
headers beforehand.</p></div></desc><link>handy_http_transport.response_output_stream.HttpResponseOutputStream.html</link><decl id="74" type="constructor"><name>this</name><desc><div><span class="undocumented-note">Undocumented in source.</span></div></desc><link>handy_http_transport.response_output_stream.HttpResponseOutputStream.this.html</link></decl><decl id="75" type="function"><name>areHeadersFlushed</name><desc><div><p>Determines if the HTTP response headers have been flushed to the
|
|
underlying output stream.</p></div></desc><link>handy_http_transport.response_output_stream.HttpResponseOutputStream.areHeadersFlushed.html</link></decl><decl id="76" type="function"><name>writeToStream</name><desc><div><p>Writes the given data to the stream. If the referenced HTTP response's
|
|
status and headers haven't yet been written, they will be written first.</p></div></desc><link>handy_http_transport.response_output_stream.HttpResponseOutputStream.writeToStream.html</link></decl><decl id="77" type="function"><name>writeHeaders</name><desc><div><p>Writes HTTP/1.1 status line and headers to the underlying output stream,
|
|
which is done before any body content can be written.</p></div></desc><link>handy_http_transport.response_output_stream.HttpResponseOutputStream.writeHeaders.html</link></decl></decl></decl><decl id="78" type="module"><name>handy_http_transport.interfaces</name><desc><div><span class="undocumented-note">Undocumented in source.</span></div></desc><link>handy_http_transport.interfaces.html</link><decl id="79" type="interface"><name>HttpTransport</name><desc><div><span class="undocumented-note">Undocumented in source.</span></div></desc><link>handy_http_transport.interfaces.HttpTransport.html</link><decl id="80" type="function"><name>start</name><desc><div><span class="undocumented-note">Undocumented in source.</span></div></desc><link>handy_http_transport.interfaces.HttpTransport.start.html</link></decl><decl id="81" type="function"><name>stop</name><desc><div><span class="undocumented-note">Undocumented in source.</span></div></desc><link>handy_http_transport.interfaces.HttpTransport.stop.html</link></decl></decl><decl id="82" type="function"><name>startInNewThread</name><desc><div><p>Starts a new thread to run an HTTP transport implementation in, separate
|
|
from the calling thread. This is useful for running a server in the
|
|
background, like for integration tests.</p></div></desc><link>handy_http_transport.interfaces.startInNewThread.html</link></decl></decl><decl id="83" type="module"><name>handy_http_transport.http2</name><desc><div><span class="undocumented-note">Undocumented in source.</span></div></desc><link>handy_http_transport.http2.html</link></decl><decl id="84" type="module"><name>handy_http_transport</name><desc><div><span class="undocumented-note">Undocumented in source.</span></div></desc><link>handy_http_transport.html</link><decl id="85" type="module"><name>handy_http_transport.http1</name><desc><div><p>This package defines the Handy-Http implementation of HTTP/1.1.</p></div></desc><link>handy_http_transport.http1.html</link><decl id="86" type="module"><name>handy_http_transport.http1.task_pool</name><desc><div><span class="undocumented-note">Undocumented in source.</span></div></desc><link>handy_http_transport.http1.task_pool.html</link><decl id="87" type="struct"><name>Http1TransportConfig</name><desc><div><p>Configuration options to provide when creating a new Http1Transport
|
|
instance.</p></div></desc><link>handy_http_transport.http1.task_pool.Http1TransportConfig.html</link><decl id="88" type="variable"><name>host</name><desc><div><p>The host address to bind to.</p></div></desc><link>handy_http_transport.http1.task_pool.Http1TransportConfig.host.html</link></decl><decl id="89" type="variable"><name>port</name><desc><div><p>The port to bind to.</p></div></desc><link>handy_http_transport.http1.task_pool.Http1TransportConfig.port.html</link></decl><decl id="90" type="variable"><name>workerCount</name><desc><div><p>The number of workers to use in the task pool.</p></div></desc><link>handy_http_transport.http1.task_pool.Http1TransportConfig.workerCount.html</link></decl></decl><decl id="91" type="function"><name>defaultConfig</name><desc><div><p>Defines the default configuration options if none are provided. They are:
|
|
* Host address 127.0.0.1
|
|
* Port 8080
|
|
* Worker count of 5.</p></div></desc><link>handy_http_transport.http1.task_pool.defaultConfig.html</link></decl><decl id="92" type="class"><name>TaskPoolHttp1Transport</name><desc><div><p>An implementation of Http1Transport which uses D's standard library
|
|
parallelization, where each incoming client request is turned into a task
|
|
and submitted to the standard task pool.</p></div></desc><link>handy_http_transport.http1.task_pool.TaskPoolHttp1Transport.html</link><decl id="93" type="constructor"><name>this</name><desc><div><p>Creates a new transport instance using a std.parallelism TaskPool for
|
|
handling requests.</p></div></desc><link>handy_http_transport.http1.task_pool.TaskPoolHttp1Transport.this.html</link></decl><decl id="94" type="function"><name>runServer</name><desc><div><span class="undocumented-note">Undocumented in source. Be warned that the author may not have intended to support it.</span></div></desc><link>handy_http_transport.http1.task_pool.TaskPoolHttp1Transport.runServer.html</link></decl><decl id="95" type="function"><name>stop</name><desc><div><span class="undocumented-note">Undocumented in source. Be warned that the author may not have intended to support it.</span></div></desc><link>handy_http_transport.http1.task_pool.TaskPoolHttp1Transport.stop.html</link></decl></decl></decl><decl id="96" type="module"><name>handy_http_transport.http1.photon</name><desc><div><span class="undocumented-note">Undocumented in source.</span></div></desc><link>handy_http_transport.http1.photon.html</link><decl id="97" type="class"><name>PhotonHttp1Transport</name><desc><div><p>An implementation of Http1Transport which uses Dimitry Olshansky's Photon
|
|
library for asynchronous task processing. A main fiber is started which
|
|
accepts incoming client sockets, and a fiber is spawned for each client so
|
|
its request can be handled asynchronously.</p></div></desc><link>handy_http_transport.http1.photon.PhotonHttp1Transport.html</link><decl id="98" type="constructor"><name>this</name><desc><div><span class="undocumented-note">Undocumented in source.</span></div></desc><link>handy_http_transport.http1.photon.PhotonHttp1Transport.this.html</link></decl><decl id="99" type="function"><name>runServer</name><desc><div><span class="undocumented-note">Undocumented in source. Be warned that the author may not have intended to support it.</span></div></desc><link>handy_http_transport.http1.photon.PhotonHttp1Transport.runServer.html</link></decl><decl id="100" type="function"><name>stop</name><desc><div><span class="undocumented-note">Undocumented in source. Be warned that the author may not have intended to support it.</span></div></desc><link>handy_http_transport.http1.photon.PhotonHttp1Transport.stop.html</link></decl></decl></decl><decl id="101" type="module"><name>handy_http_transport.http1.epoll</name><desc><div><span class="undocumented-note">Undocumented in source.</span></div></desc><link>handy_http_transport.http1.epoll.html</link><decl id="102" type="function"><name>accept4</name><desc><div><span class="undocumented-note">Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.</span></div></desc><link>handy_http_transport.http1.epoll.accept4.html</link></decl><decl id="103" type="class"><name>Http1EpollTransport</name><desc><div><span class="undocumented-note">Undocumented in source.</span></div></desc><link>handy_http_transport.http1.epoll.Http1EpollTransport.html</link><decl id="104" type="constructor"><name>this</name><desc><div><span class="undocumented-note">Undocumented in source.</span></div></desc><link>handy_http_transport.http1.epoll.Http1EpollTransport.this.html</link></decl><decl id="105" type="function"><name>start</name><desc><div><span class="undocumented-note">Undocumented in source. Be warned that the author may not have intended to support it.</span></div></desc><link>handy_http_transport.http1.epoll.Http1EpollTransport.start.html</link></decl></decl></decl><decl id="106" type="module"><name>handy_http_transport.http1.transport</name><desc><div><span class="undocumented-note">Undocumented in source.</span></div></desc><link>handy_http_transport.http1.transport.html</link><decl id="107" type="class"><name>Http1Transport</name><desc><div><p>Base class for HTTP/1.1 transport, where different subclasses can define
|
|
how the actual socket communication works (threadpool / epoll/ etc).</p></div></desc><link>handy_http_transport.http1.transport.Http1Transport.html</link><decl id="108" type="variable"><name>requestHandler</name><desc><div><span class="undocumented-note">Undocumented in source.</span></div></desc><link>handy_http_transport.http1.transport.Http1Transport.requestHandler.html</link></decl><decl id="109" type="variable"><name>port</name><desc><div><span class="undocumented-note">Undocumented in source.</span></div></desc><link>handy_http_transport.http1.transport.Http1Transport.port.html</link></decl><decl id="110" type="constructor"><name>this</name><desc><div><span class="undocumented-note">Undocumented in source.</span></div></desc><link>handy_http_transport.http1.transport.Http1Transport.this.html</link></decl><decl id="111" type="function"><name>isRunning</name><desc><div><span class="undocumented-note">Undocumented in source. Be warned that the author may not have intended to support it.</span></div></desc><link>handy_http_transport.http1.transport.Http1Transport.isRunning.html</link></decl><decl id="112" type="function"><name>start</name><desc><div><span class="undocumented-note">Undocumented in source. Be warned that the author may not have intended to support it.</span></div></desc><link>handy_http_transport.http1.transport.Http1Transport.start.html</link></decl><decl id="113" type="function"><name>runServer</name><desc><div><span class="undocumented-note">Undocumented in source.</span></div></desc><link>handy_http_transport.http1.transport.Http1Transport.runServer.html</link></decl><decl id="114" type="function"><name>stop</name><desc><div><span class="undocumented-note">Undocumented in source. Be warned that the author may not have intended to support it.</span></div></desc><link>handy_http_transport.http1.transport.Http1Transport.stop.html</link></decl></decl><decl id="115" type="function"><name>testHttp1Transport</name><desc><div><p>A generic test to ensure that any Http1Transport implementation behaves
|
|
properly to start &amp; stop, and process requests when running.</p></div></desc><link>handy_http_transport.http1.transport.testHttp1Transport.html</link></decl><decl id="116" type="function"><name>handleClient</name><desc><div><p>The main logic for handling an incoming request from a client. It involves
|
|
reading bytes from the client, parsing them as an HTTP request, passing that
|
|
to the HTTP Transport's request handler, and then writing the response back
|
|
to the client.</p></div></desc><link>handy_http_transport.http1.transport.handleClient.html</link></decl><decl id="117" type="function"><name>getAddress</name><desc><div><p>Gets a ClientAddress value from a socket's address information.</p></div></desc><link>handy_http_transport.http1.transport.getAddress.html</link></decl><decl id="118" type="alias"><name>HttpRequestParseResult</name><desc><div><p>Alias for the result of the <tt class="inline-code">readHttpRequest</tt> function which parses HTTP requests.</p></div></desc><link>handy_http_transport.http1.transport.HttpRequestParseResult.html</link></decl><decl id="119" type="function"><name>readHttpRequest</name><desc><div><p>Parses an HTTP/1.1 request from a byte input stream.</p></div></desc><link>handy_http_transport.http1.transport.readHttpRequest.html</link></decl><decl id="120" type="function"><name>parseHeaders</name><desc><div><p>Parses HTTP headers from an input stream, and returns them as an associative
|
|
array mapping header names to their list of values.</p></div></desc><link>handy_http_transport.http1.transport.parseHeaders.html</link></decl></decl></decl><decl id="121" type="module"><name>handy_http_transport.response_output_stream</name><desc><div><span class="undocumented-note">Undocumented in source.</span></div></desc><link>handy_http_transport.response_output_stream.html</link><decl id="122" type="struct"><name>HttpResponseOutputStream</name><desc><div><p>A wrapper around a byte output stream that's used for writing HTTP response
|
|
content. It keeps a reference to the <tt class="inline-code">ServerHttpResponse</tt> so that when a
|
|
handler writes data to the stream, it'll flush the HTTP response status and
|
|
headers beforehand.</p></div></desc><link>handy_http_transport.response_output_stream.HttpResponseOutputStream.html</link><decl id="123" type="constructor"><name>this</name><desc><div><span class="undocumented-note">Undocumented in source.</span></div></desc><link>handy_http_transport.response_output_stream.HttpResponseOutputStream.this.html</link></decl><decl id="124" type="function"><name>areHeadersFlushed</name><desc><div><p>Determines if the HTTP response headers have been flushed to the
|
|
underlying output stream.</p></div></desc><link>handy_http_transport.response_output_stream.HttpResponseOutputStream.areHeadersFlushed.html</link></decl><decl id="125" type="function"><name>writeToStream</name><desc><div><p>Writes the given data to the stream. If the referenced HTTP response's
|
|
status and headers haven't yet been written, they will be written first.</p></div></desc><link>handy_http_transport.response_output_stream.HttpResponseOutputStream.writeToStream.html</link></decl><decl id="126" type="function"><name>writeHeaders</name><desc><div><p>Writes HTTP/1.1 status line and headers to the underlying output stream,
|
|
which is done before any body content can be written.</p></div></desc><link>handy_http_transport.response_output_stream.HttpResponseOutputStream.writeHeaders.html</link></decl></decl></decl><decl id="127" type="module"><name>handy_http_transport.interfaces</name><desc><div><span class="undocumented-note">Undocumented in source.</span></div></desc><link>handy_http_transport.interfaces.html</link><decl id="128" type="interface"><name>HttpTransport</name><desc><div><span class="undocumented-note">Undocumented in source.</span></div></desc><link>handy_http_transport.interfaces.HttpTransport.html</link><decl id="129" type="function"><name>start</name><desc><div><span class="undocumented-note">Undocumented in source.</span></div></desc><link>handy_http_transport.interfaces.HttpTransport.start.html</link></decl><decl id="130" type="function"><name>stop</name><desc><div><span class="undocumented-note">Undocumented in source.</span></div></desc><link>handy_http_transport.interfaces.HttpTransport.stop.html</link></decl></decl><decl id="131" type="function"><name>startInNewThread</name><desc><div><p>Starts a new thread to run an HTTP transport implementation in, separate
|
|
from the calling thread. This is useful for running a server in the
|
|
background, like for integration tests.</p></div></desc><link>handy_http_transport.interfaces.startInNewThread.html</link></decl></decl><decl id="132" type="module"><name>handy_http_transport.http2</name><desc><div><span class="undocumented-note">Undocumented in source.</span></div></desc><link>handy_http_transport.http2.html</link></decl><decl id="133" type="module"><name>handy_http_transport.helpers</name><desc><div><span class="undocumented-note">Undocumented in source.</span></div></desc><link>handy_http_transport.helpers.html</link><decl id="134" type="function"><name>consumeUntil</name><desc><div><p>Helper function to consume string content from an input stream until a
|
|
certain target pattern of characters is encountered.</p></div></desc><link>handy_http_transport.helpers.consumeUntil.html</link></decl><decl id="135" type="function"><name>indexOf</name><desc><div><p>Internal helper function to get the first index of a character in a string.</p></div></desc><link>handy_http_transport.helpers.indexOf.html</link></decl><decl id="136" type="function"><name>stripSpaces</name><desc><div><p>Internal helper function that returns the slice of a string excluding any
|
|
preceding or trailing spaces.</p></div></desc><link>handy_http_transport.helpers.stripSpaces.html</link></decl><decl id="137" type="function"><name>writeUIntToBuffer</name><desc><div><p>Helper function to append an unsigned integer value to a char buffer. It is
|
|
assumed that there's enough space to write the value.</p></div></desc><link>handy_http_transport.helpers.writeUIntToBuffer.html</link></decl></decl></decl><decl id="138" type="module"><name>handy_http_transport.helpers</name><desc><div><span class="undocumented-note">Undocumented in source.</span></div></desc><link>handy_http_transport.helpers.html</link><decl id="139" type="function"><name>consumeUntil</name><desc><div><p>Helper function to consume string content from an input stream until a
|
|
certain target pattern of characters is encountered.</p></div></desc><link>handy_http_transport.helpers.consumeUntil.html</link></decl><decl id="140" type="function"><name>indexOf</name><desc><div><p>Internal helper function to get the first index of a character in a string.</p></div></desc><link>handy_http_transport.helpers.indexOf.html</link></decl><decl id="141" type="function"><name>stripSpaces</name><desc><div><p>Internal helper function that returns the slice of a string excluding any
|
|
preceding or trailing spaces.</p></div></desc><link>handy_http_transport.helpers.stripSpaces.html</link></decl><decl id="142" type="function"><name>writeUIntToBuffer</name><desc><div><p>Helper function to append an unsigned integer value to a char buffer. It is
|
|
assumed that there's enough space to write the value.</p></div></desc><link>handy_http_transport.helpers.writeUIntToBuffer.html</link></decl></decl></listing>
|
|
<index>
|
|
</index>
|
|
</adrdox>
|
|
</script>
|
|
<script src="search-docs.js"></script>
|
|
</body></html>
|