-
Notifications
You must be signed in to change notification settings - Fork 1
/
vconn-args.en.html
124 lines (118 loc) · 7.15 KB
/
vconn-args.en.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="X-UA-Compatible" content="IE=Edge" />
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>TSVConn Arguments — AMC Traffic Server Documentation</title>
<link rel="stylesheet" href="_static/sphinxdoc.css" type="text/css" />
<link rel="stylesheet" href="_static/pygments.css" type="text/css" />
<script type="text/javascript" id="documentation_options" data-url_root="./" src="_static/documentation_options.js"></script>
<script type="text/javascript" src="_static/jquery.js"></script>
<script type="text/javascript" src="_static/underscore.js"></script>
<script type="text/javascript" src="_static/doctools.js"></script>
<link rel="index" title="Index" href="genindex.html" />
<link rel="search" title="Search" href="search.html" />
<link rel="next" title="Layer 4 Proxying" href="l4r.en.html" />
<link rel="prev" title="Body Factory Refactoring" href="body-factory.en.html" />
</head><body>
<div class="related" role="navigation" aria-label="related navigation">
<h3>Navigation</h3>
<ul>
<li class="right" style="margin-right: 10px">
<a href="genindex.html" title="General Index"
accesskey="I">index</a></li>
<li class="right" >
<a href="l4r.en.html" title="Layer 4 Proxying"
accesskey="N">next</a> |</li>
<li class="right" >
<a href="body-factory.en.html" title="Body Factory Refactoring"
accesskey="P">previous</a> |</li>
<li class="nav-item nav-item-0"><a href="index.html">SWOC Docs</a> »</li>
<li class="nav-item nav-item-1"><a href="ats-projects.en.html" accesskey="U">Traffic Server Projects</a> »</li>
</ul>
</div>
<div class="sphinxsidebar" role="navigation" aria-label="main navigation">
<div class="sphinxsidebarwrapper">
<p class="logo"><a href="index.html">
<img class="logo" src="_static/balcora-gate-400x400.jpg" alt="Logo"/>
</a></p>
<h4>Previous topic</h4>
<p class="topless"><a href="body-factory.en.html"
title="previous chapter">Body Factory Refactoring</a></p>
<h4>Next topic</h4>
<p class="topless"><a href="l4r.en.html"
title="next chapter">Layer 4 Proxying</a></p>
<div role="note" aria-label="source link">
<h3>This Page</h3>
<ul class="this-page-menu">
<li><a href="_sources/vconn-args.en.rst.txt"
rel="nofollow">Show Source</a></li>
</ul>
</div>
<div id="searchbox" style="display: none" role="search">
<h3>Quick search</h3>
<div class="searchformwrapper">
<form class="search" action="search.html" method="get">
<input type="text" name="q" />
<input type="submit" value="Go" />
<input type="hidden" name="check_keywords" value="yes" />
<input type="hidden" name="area" value="default" />
</form>
</div>
</div>
<script type="text/javascript">$('#searchbox').show(0);</script>
</div>
</div>
<div class="document">
<div class="documentwrapper">
<div class="bodywrapper">
<div class="body" role="main">
<div class="section" id="tsvconn-arguments">
<span id="vconn-args"></span><h1>TSVConn Arguments<a class="headerlink" href="#tsvconn-arguments" title="Permalink to this headline">¶</a></h1>
<p>To enable better Layer 4 routing it would be very helpful to be extend the transaction and session
rguments to virtual connections. Plugins can then easily pass data from early intervention (layer 4)
callbacks to transaction (layer 7) callbacks. For plugins such arguments only needto be attached to
<code class="code docutils literal notranslate"><span class="pre">INKVConnInternal</span></code> and <code class="code docutils literal notranslate"><span class="pre">NetVConnection</span></code> as there aren’t any other virtual connection
types accessible from the plugin API.</p>
<p>In terms of implementation the primary issue is adding a hook that a plugin can use to clean up
resources. There are already sufficient early intervention hooks to set the data but both
<code class="code docutils literal notranslate"><span class="pre">TS_HTTP_TXN_CLOSE_HOOK</span></code> and <code class="code docutils literal notranslate"><span class="pre">TS_HTTP_SSN_CLOSE_HOOK</span></code> hooks are insufficient in case of
error before the client session is constructed. A new hook, <code class="code docutils literal notranslate"><span class="pre">TS_VCONN_CLOSE</span></code>, is needed to do
this cleanup. We should rename <code class="code docutils literal notranslate"><span class="pre">TS_VCONN_PRE_ACCEPT_HOOK</span></code> to <code class="code docutils literal notranslate"><span class="pre">TS_VCONN_START_HOOK</span></code>.</p>
<p>In terms of implementation we would add a <code class="code docutils literal notranslate"><span class="pre">std::vector</span></code> to a class which would be inherited by
<a class="reference internal" href="external-types.en.html#_CPPv316INKVConnInternal" title="INKVConnInternal"><code class="xref cpp cpp-class docutils literal notranslate"><span class="pre">INKVConnInternal</span></code></a> and <a class="reference internal" href="external-types.en.html#_CPPv314NetVConnection" title="NetVConnection"><code class="xref cpp cpp-class docutils literal notranslate"><span class="pre">NetVConnection</span></code></a>. This has a size of 24 bytes default
constructed. When needed the vector would be extended to a compile time constant number of entries.
This is a trade off from a constant sized array in that it is expected most instances will not have
the arguments in which no memory is allocated. Only instances that need the data will allocate,
reducing the overall memory footprint.</p>
<p>A sample man page is <a class="reference internal" href="api/TSVConnArgs.en.html#tsvconnargs"><span class="std std-ref">here</span></a>.</p>
<p>The original discussion is <a class="reference external" href="https://github.com/apache/trafficserver/issues/2388">here</a>.</p>
</div>
</div>
</div>
</div>
<div class="clearer"></div>
</div>
<div class="related" role="navigation" aria-label="related navigation">
<h3>Navigation</h3>
<ul>
<li class="right" style="margin-right: 10px">
<a href="genindex.html" title="General Index"
>index</a></li>
<li class="right" >
<a href="l4r.en.html" title="Layer 4 Proxying"
>next</a> |</li>
<li class="right" >
<a href="body-factory.en.html" title="Body Factory Refactoring"
>previous</a> |</li>
<li class="nav-item nav-item-0"><a href="index.html">SWOC Docs</a> »</li>
<li class="nav-item nav-item-1"><a href="ats-projects.en.html" >Traffic Server Projects</a> »</li>
</ul>
</div>
<div class="footer" role="contentinfo">
© Copyright 2017, [email protected].
Created using <a href="http://sphinx-doc.org/">Sphinx</a> 1.7.5.
</div>
</body>
</html>