41 lines
5.8 KiB
HTML
41 lines
5.8 KiB
HTML
<!DOCTYPE html>
|
|
<html lang="en">
|
|
<head>
|
|
<title>handy_http_transport.http1.transport (handy_http_transport.http1.transport)</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">
|
|
<h1>handy_http_transport.http1.transport</h1><div class="breadcrumbs"><a class="breadcrumb" href="handy_http_transport.html">handy_http_transport</a> <a class="breadcrumb" href="handy_http_transport.http1.html">http1</a> </div><div><div class="documentation-comment synopsis"><div><span class="undocumented-note">Undocumented in source.</span></div></div></div><div class="annotated-prototype"></div><h2 id="members"><a class="header-anchor" href="#members">Members</a></h2><h3 class="member-list-header hide-from-toc" id="alias"><a class="header-anchor" href="#alias">Aliases</a></h3><dl class="member-list native"><dt><a href="handy_http_transport.http1.transport.HttpRequestParseResult.html">HttpRequestParseResult</a><div class="simplified-prototype" style="max-width: 99ch;"><span class="builtin-type">alias</span> <span class="name">HttpRequestParseResult</span> = <tt class="highlighted"><span class="hid">Either</span>!(<span class="hid">ServerHttpRequest</span>, <span class="str">"request"</span>, <span class="hid">StreamError</span>, <span class="str">"error"</span>)</tt></div></dt><dd><div><p>Alias for the result of the <tt class="inline-code">readHttpRequest</tt> function which parses HTTP requests.</p></div></dd></dl><h3 class="member-list-header hide-from-toc" id="class"><a class="header-anchor" href="#class">Classes</a></h3><dl class="member-list native"><dt><a href="handy_http_transport.http1.transport.Http1Transport.html">Http1Transport</a><div class="simplified-prototype" style="max-width: 22ch;"><span class="builtin-type">class</span> <span class="name">Http1Transport</span></div></dt><dd><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></dd></dl><h3 class="member-list-header hide-from-toc" id="function"><a class="header-anchor" href="#function">Functions</a></h3><dl class="member-list native"><dt><a href="handy_http_transport.http1.transport.getAddress.html">getAddress</a><div class="simplified-prototype" style="max-width: 42ch;"><tt class="highlighted"><span class="hid">ClientAddress</span></tt> <span class="name">getAddress</span>(Socket socket)</div></dt><dd><div><p>Gets a ClientAddress value from a socket's address information.</p></div></dd><dt><a href="handy_http_transport.http1.transport.handleClient.html">handleClient</a><div class="simplified-prototype" style="max-width: 80ch;"><tt class="highlighted"><span class="type">void</span></tt> <span class="name">handleClient</span>(Socket clientSocket, HttpRequestHandler requestHandler)</div></dt><dd><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></dd><dt><a href="handy_http_transport.http1.transport.parseHeaders.html">parseHeaders</a><div class="simplified-prototype" style="max-width: 94ch;"><tt class="highlighted"><span class="hid">Either</span>!(<span class="type">string</span>[][<span class="type">string</span>], <span class="str">"headers"</span>, <span class="hid">StreamError</span>, <span class="str">"error"</span>)</tt> <span class="name">parseHeaders</span>(S inputStream)</div></dt><dd><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></dd><dt><a href="handy_http_transport.http1.transport.readHttpRequest.html">readHttpRequest</a><div class="simplified-prototype" style="max-width: 80ch;"><tt class="highlighted"><span class="hid">HttpRequestParseResult</span></tt> <span class="name">readHttpRequest</span>(S inputStream, ClientAddress addr)</div></dt><dd><div><p>Parses an HTTP/1.1 request from a byte input stream.</p></div></dd><dt><a href="handy_http_transport.http1.transport.testHttp1Transport.html">testHttp1Transport</a><div class="simplified-prototype" style="max-width: 53ch;"><tt class="highlighted"><span class="type">void</span></tt> <span class="name">testHttp1Transport</span>(Http1Transport transport)</div></dt><dd><div><p>A generic test to ensure that any Http1Transport implementation behaves
|
|
properly to start & stop, and process requests when running.</p></div></dd></dl><div></div></div>
|
|
<div id="page-nav"><a class="parent" href="handy_http_transport.html">handy_http_transport</a> <a class="parent" href="handy_http_transport.http1.html">http1</a>
|
|
<span class="type-separator">modules</span><ul><li><a class="module" href="handy_http_transport.http1.epoll.html">epoll</a></li><li><a class="module" href="handy_http_transport.http1.photon.html">photon</a></li><li><a class="module" href="handy_http_transport.http1.task_pool.html">task_pool</a></li><li><a class="module current" href="handy_http_transport.http1.transport.html">transport</a></li></ul></div>
|
|
</div>
|
|
<div id="page-footer">Page generated by <a href="https://github.com/adamdruppe/adrdox">adrdox</a></div>
|
|
</body>
|
|
</html> |