This commit is contained in:
bthomee
2025-11-04 00:36:48 -08:00
parent 691c2d46b0
commit 33451fdc96
3033 changed files with 499624 additions and 524738 deletions

View File

@@ -81,199 +81,180 @@ $(document).ready(function() { init_codefold(0); });
<div class="headertitle"><div class="title">Handshake.h</div></div>
</div><!--header-->
<div class="contents">
<div class="fragment"><div class="line"><a id="l00001" name="l00001"></a><span class="lineno"> 1</span><span class="comment">//------------------------------------------------------------------------------</span></div>
<div class="line"><a id="l00002" name="l00002"></a><span class="lineno"> 2</span><span class="comment">/*</span></div>
<div class="line"><a id="l00003" name="l00003"></a><span class="lineno"> 3</span><span class="comment"> This file is part of rippled: https://github.com/ripple/rippled</span></div>
<div class="line"><a id="l00004" name="l00004"></a><span class="lineno"> 4</span><span class="comment"> Copyright (c) 2012, 2013 Ripple Labs Inc.</span></div>
<div class="line"><a id="l00005" name="l00005"></a><span class="lineno"> 5</span><span class="comment"></span> </div>
<div class="line"><a id="l00006" name="l00006"></a><span class="lineno"> 6</span><span class="comment"> Permission to use, copy, modify, and/or distribute this software for any</span></div>
<div class="line"><a id="l00007" name="l00007"></a><span class="lineno"> 7</span><span class="comment"> purpose with or without fee is hereby granted, provided that the above</span></div>
<div class="line"><a id="l00008" name="l00008"></a><span class="lineno"> 8</span><span class="comment"> copyright notice and this permission notice appear in all copies.</span></div>
<div class="line"><a id="l00009" name="l00009"></a><span class="lineno"> 9</span><span class="comment"></span> </div>
<div class="line"><a id="l00010" name="l00010"></a><span class="lineno"> 10</span><span class="comment"> THE SOFTWARE IS PROVIDED &quot;AS IS&quot; AND THE AUTHOR DISCLAIMS ALL WARRANTIES</span></div>
<div class="line"><a id="l00011" name="l00011"></a><span class="lineno"> 11</span><span class="comment"> WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF</span></div>
<div class="line"><a id="l00012" name="l00012"></a><span class="lineno"> 12</span><span class="comment"> MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR</span></div>
<div class="line"><a id="l00013" name="l00013"></a><span class="lineno"> 13</span><span class="comment"> ANY SPECIAL , DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES</span></div>
<div class="line"><a id="l00014" name="l00014"></a><span class="lineno"> 14</span><span class="comment"> WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN</span></div>
<div class="line"><a id="l00015" name="l00015"></a><span class="lineno"> 15</span><span class="comment"> ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF</span></div>
<div class="line"><a id="l00016" name="l00016"></a><span class="lineno"> 16</span><span class="comment"> OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.</span></div>
<div class="line"><a id="l00017" name="l00017"></a><span class="lineno"> 17</span><span class="comment">*/</span></div>
<div class="line"><a id="l00018" name="l00018"></a><span class="lineno"> 18</span><span class="comment">//==============================================================================</span></div>
<div class="fragment"><div class="line"><a id="l00001" name="l00001"></a><span class="lineno"> 1</span><span class="preprocessor">#ifndef XRPL_OVERLAY_HANDSHAKE_H_INCLUDED</span></div>
<div class="line"><a id="l00002" name="l00002"></a><span class="lineno"> 2</span><span class="preprocessor">#define XRPL_OVERLAY_HANDSHAKE_H_INCLUDED</span></div>
<div class="line"><a id="l00003" name="l00003"></a><span class="lineno"> 3</span> </div>
<div class="line"><a id="l00004" name="l00004"></a><span class="lineno"> 4</span><span class="preprocessor">#include &lt;xrpld/app/main/Application.h&gt;</span></div>
<div class="line"><a id="l00005" name="l00005"></a><span class="lineno"> 5</span><span class="preprocessor">#include &lt;xrpld/overlay/detail/ProtocolVersion.h&gt;</span></div>
<div class="line"><a id="l00006" name="l00006"></a><span class="lineno"> 6</span> </div>
<div class="line"><a id="l00007" name="l00007"></a><span class="lineno"> 7</span><span class="preprocessor">#include &lt;xrpl/beast/utility/Journal.h&gt;</span></div>
<div class="line"><a id="l00008" name="l00008"></a><span class="lineno"> 8</span><span class="preprocessor">#include &lt;xrpl/protocol/BuildInfo.h&gt;</span></div>
<div class="line"><a id="l00009" name="l00009"></a><span class="lineno"> 9</span> </div>
<div class="line"><a id="l00010" name="l00010"></a><span class="lineno"> 10</span><span class="preprocessor">#include &lt;boost/asio/ssl.hpp&gt;</span></div>
<div class="line"><a id="l00011" name="l00011"></a><span class="lineno"> 11</span><span class="preprocessor">#include &lt;boost/beast/core/tcp_stream.hpp&gt;</span></div>
<div class="line"><a id="l00012" name="l00012"></a><span class="lineno"> 12</span><span class="preprocessor">#include &lt;boost/beast/http/dynamic_body.hpp&gt;</span></div>
<div class="line"><a id="l00013" name="l00013"></a><span class="lineno"> 13</span><span class="preprocessor">#include &lt;boost/beast/http/empty_body.hpp&gt;</span></div>
<div class="line"><a id="l00014" name="l00014"></a><span class="lineno"> 14</span><span class="preprocessor">#include &lt;boost/beast/http/fields.hpp&gt;</span></div>
<div class="line"><a id="l00015" name="l00015"></a><span class="lineno"> 15</span><span class="preprocessor">#include &lt;boost/beast/ssl/ssl_stream.hpp&gt;</span></div>
<div class="line"><a id="l00016" name="l00016"></a><span class="lineno"> 16</span> </div>
<div class="line"><a id="l00017" name="l00017"></a><span class="lineno"> 17</span><span class="preprocessor">#include &lt;<a class="codeRef" href="http://en.cppreference.com/w/cpp/header/optional.html">optional</a>&gt;</span></div>
<div class="line"><a id="l00018" name="l00018"></a><span class="lineno"> 18</span><span class="preprocessor">#include &lt;<a class="codeRef" href="http://en.cppreference.com/w/cpp/header/utility.html">utility</a>&gt;</span></div>
<div class="line"><a id="l00019" name="l00019"></a><span class="lineno"> 19</span> </div>
<div class="line"><a id="l00020" name="l00020"></a><span class="lineno"> 20</span><span class="preprocessor">#ifndef XRPL_OVERLAY_HANDSHAKE_H_INCLUDED</span></div>
<div class="line"><a id="l00021" name="l00021"></a><span class="lineno"> 21</span><span class="preprocessor">#define XRPL_OVERLAY_HANDSHAKE_H_INCLUDED</span></div>
<div class="line"><a id="l00022" name="l00022"></a><span class="lineno"> 22</span> </div>
<div class="line"><a id="l00023" name="l00023"></a><span class="lineno"> 23</span><span class="preprocessor">#include &lt;xrpld/app/main/Application.h&gt;</span></div>
<div class="line"><a id="l00024" name="l00024"></a><span class="lineno"> 24</span><span class="preprocessor">#include &lt;xrpld/overlay/detail/ProtocolVersion.h&gt;</span></div>
<div class="line"><a id="l00025" name="l00025"></a><span class="lineno"> 25</span> </div>
<div class="line"><a id="l00026" name="l00026"></a><span class="lineno"> 26</span><span class="preprocessor">#include &lt;xrpl/beast/utility/Journal.h&gt;</span></div>
<div class="line"><a id="l00027" name="l00027"></a><span class="lineno"> 27</span><span class="preprocessor">#include &lt;xrpl/protocol/BuildInfo.h&gt;</span></div>
<div class="line"><a id="l00028" name="l00028"></a><span class="lineno"> 28</span> </div>
<div class="line"><a id="l00029" name="l00029"></a><span class="lineno"> 29</span><span class="preprocessor">#include &lt;boost/asio/ssl.hpp&gt;</span></div>
<div class="line"><a id="l00030" name="l00030"></a><span class="lineno"> 30</span><span class="preprocessor">#include &lt;boost/beast/core/tcp_stream.hpp&gt;</span></div>
<div class="line"><a id="l00031" name="l00031"></a><span class="lineno"> 31</span><span class="preprocessor">#include &lt;boost/beast/http/dynamic_body.hpp&gt;</span></div>
<div class="line"><a id="l00032" name="l00032"></a><span class="lineno"> 32</span><span class="preprocessor">#include &lt;boost/beast/http/empty_body.hpp&gt;</span></div>
<div class="line"><a id="l00033" name="l00033"></a><span class="lineno"> 33</span><span class="preprocessor">#include &lt;boost/beast/http/fields.hpp&gt;</span></div>
<div class="line"><a id="l00034" name="l00034"></a><span class="lineno"> 34</span><span class="preprocessor">#include &lt;boost/beast/ssl/ssl_stream.hpp&gt;</span></div>
<div class="line"><a id="l00035" name="l00035"></a><span class="lineno"> 35</span> </div>
<div class="line"><a id="l00036" name="l00036"></a><span class="lineno"> 36</span><span class="preprocessor">#include &lt;<a class="codeRef" href="http://en.cppreference.com/w/cpp/header/optional.html">optional</a>&gt;</span></div>
<div class="line"><a id="l00037" name="l00037"></a><span class="lineno"> 37</span><span class="preprocessor">#include &lt;<a class="codeRef" href="http://en.cppreference.com/w/cpp/header/utility.html">utility</a>&gt;</span></div>
<div class="line"><a id="l00038" name="l00038"></a><span class="lineno"> 38</span> </div>
<div class="line"><a id="l00039" name="l00039"></a><span class="lineno"> 39</span><span class="keyword">namespace </span><a class="code hl_namespace" href="namespaceripple.html">ripple</a> {</div>
<div class="line"><a id="l00040" name="l00040"></a><span class="lineno"> 40</span> </div>
<div class="line"><a id="l00041" name="l00041"></a><span class="lineno"><a class="line" href="namespaceripple.html#acf6e0f2509512b9dac2b0daccafd75b9"> 41</a></span><span class="keyword">using </span><a class="code hl_typedef" href="namespaceripple.html#acf6e0f2509512b9dac2b0daccafd75b9">socket_type</a> = boost::beast::tcp_stream;</div>
<div class="line"><a id="l00042" name="l00042"></a><span class="lineno"><a class="line" href="namespaceripple.html#a0356489dd518b8dc89a1153048cb4aee"> 42</a></span><span class="keyword">using </span><a class="code hl_typedef" href="namespaceripple.html#a0356489dd518b8dc89a1153048cb4aee">stream_type</a> = boost::beast::ssl_stream&lt;socket_type&gt;;</div>
<div class="line"><a id="l00043" name="l00043"></a><span class="lineno"><a class="line" href="namespaceripple.html#aca9c2c7a74ddd4a436b5984f6a265621"> 43</a></span><span class="keyword">using </span><a class="code hl_typedef" href="namespaceripple.html#aca9c2c7a74ddd4a436b5984f6a265621">request_type</a> =</div>
<div class="line"><a id="l00044" name="l00044"></a><span class="lineno"> 44</span> boost::beast::http::request&lt;boost::beast::http::empty_body&gt;;</div>
<div class="line"><a id="l00045" name="l00045"></a><span class="lineno"> 45</span><span class="keyword">using </span><a class="code hl_typedef" href="namespaceripple.html#aa265217edeb8282e636c78b50049f4c0">http_request_type</a> =</div>
<div class="line"><a id="l00046" name="l00046"></a><span class="lineno"> 46</span> boost::beast::http::request&lt;boost::beast::http::dynamic_body&gt;;</div>
<div class="line"><a id="l00047" name="l00047"></a><span class="lineno"> 47</span><span class="keyword">using </span><a class="code hl_typedef" href="namespaceripple.html#a2581fa85c4291f16bf9e17d78615d584">http_response_type</a> =</div>
<div class="line"><a id="l00048" name="l00048"></a><span class="lineno"> 48</span> boost::beast::http::response&lt;boost::beast::http::dynamic_body&gt;;</div>
<div class="line"><a id="l00049" name="l00049"></a><span class="lineno"> 49</span> </div>
<div class="line"><a id="l00059" name="l00059"></a><span class="lineno"> 59</span><a class="code hl_classRef" href="http://en.cppreference.com/w/cpp/utility/optional.html">std::optional&lt;uint256&gt;</a></div>
<div class="line"><a id="l00060" name="l00060"></a><span class="lineno"> 60</span><a class="code hl_function" href="namespaceripple.html#a7241d07322a0d8fa2e2effedd739a90f">makeSharedValue</a>(<a class="code hl_typedef" href="namespaceripple.html#a0356489dd518b8dc89a1153048cb4aee">stream_type</a>&amp; ssl, <a class="code hl_class" href="classbeast_1_1Journal.html">beast::Journal</a> journal);</div>
<div class="line"><a id="l00061" name="l00061"></a><span class="lineno"> 61</span> </div>
<div class="line"><a id="l00064" name="l00064"></a><span class="lineno"> 64</span><span class="keywordtype">void</span></div>
<div class="line"><a id="l00065" name="l00065"></a><span class="lineno"> 65</span><a class="code hl_function" href="namespaceripple.html#a2f6f4c48edfa4bab7857fc6d554d0bcf">buildHandshake</a>(</div>
<div class="line"><a id="l00066" name="l00066"></a><span class="lineno"> 66</span> boost::beast::http::fields&amp; h,</div>
<div class="line"><a id="l00067" name="l00067"></a><span class="lineno"> 67</span> <a class="code hl_class" href="classripple_1_1base__uint.html">uint256</a> <span class="keyword">const</span>&amp; sharedValue,</div>
<div class="line"><a id="l00068" name="l00068"></a><span class="lineno"> 68</span> <a class="code hl_classRef" href="http://en.cppreference.com/w/cpp/utility/optional.html">std::optional&lt;std::uint32_t&gt;</a> networkID,</div>
<div class="line"><a id="l00069" name="l00069"></a><span class="lineno"> 69</span> <a class="code hl_typedef" href="namespacebeast_1_1IP.html#adbe597760cb20a7aa3f2ff92f7bed2cc">beast::IP::Address</a> public_ip,</div>
<div class="line"><a id="l00070" name="l00070"></a><span class="lineno"> 70</span> <a class="code hl_typedef" href="namespacebeast_1_1IP.html#adbe597760cb20a7aa3f2ff92f7bed2cc">beast::IP::Address</a> remote_ip,</div>
<div class="line"><a id="l00071" name="l00071"></a><span class="lineno"> 71</span> <a class="code hl_class" href="classripple_1_1Application.html">Application</a>&amp; app);</div>
<div class="line"><a id="l00072" name="l00072"></a><span class="lineno"> 72</span> </div>
<div class="line"><a id="l00084" name="l00084"></a><span class="lineno"> 84</span><a class="code hl_class" href="classripple_1_1PublicKey.html">PublicKey</a></div>
<div class="line"><a id="l00085" name="l00085"></a><span class="lineno"> 85</span><a class="code hl_function" href="namespaceripple.html#acd7881ae39681c7d64a5904b367219ab">verifyHandshake</a>(</div>
<div class="line"><a id="l00086" name="l00086"></a><span class="lineno"> 86</span> boost::beast::http::fields <span class="keyword">const</span>&amp; headers,</div>
<div class="line"><a id="l00087" name="l00087"></a><span class="lineno"> 87</span> <a class="code hl_class" href="classripple_1_1base__uint.html">uint256</a> <span class="keyword">const</span>&amp; sharedValue,</div>
<div class="line"><a id="l00088" name="l00088"></a><span class="lineno"> 88</span> <a class="code hl_classRef" href="http://en.cppreference.com/w/cpp/utility/optional.html">std::optional&lt;std::uint32_t&gt;</a> networkID,</div>
<div class="line"><a id="l00089" name="l00089"></a><span class="lineno"> 89</span> <a class="code hl_typedef" href="namespacebeast_1_1IP.html#adbe597760cb20a7aa3f2ff92f7bed2cc">beast::IP::Address</a> public_ip,</div>
<div class="line"><a id="l00090" name="l00090"></a><span class="lineno"> 90</span> <a class="code hl_typedef" href="namespacebeast_1_1IP.html#adbe597760cb20a7aa3f2ff92f7bed2cc">beast::IP::Address</a> remote,</div>
<div class="line"><a id="l00091" name="l00091"></a><span class="lineno"> 91</span> <a class="code hl_class" href="classripple_1_1Application.html">Application</a>&amp; app);</div>
<div class="line"><a id="l00020" name="l00020"></a><span class="lineno"> 20</span><span class="keyword">namespace </span><a class="code hl_namespace" href="namespaceripple.html">ripple</a> {</div>
<div class="line"><a id="l00021" name="l00021"></a><span class="lineno"> 21</span> </div>
<div class="line"><a id="l00022" name="l00022"></a><span class="lineno"><a class="line" href="namespaceripple.html#acf6e0f2509512b9dac2b0daccafd75b9"> 22</a></span><span class="keyword">using </span><a class="code hl_typedef" href="namespaceripple.html#acf6e0f2509512b9dac2b0daccafd75b9">socket_type</a> = boost::beast::tcp_stream;</div>
<div class="line"><a id="l00023" name="l00023"></a><span class="lineno"><a class="line" href="namespaceripple.html#a0356489dd518b8dc89a1153048cb4aee"> 23</a></span><span class="keyword">using </span><a class="code hl_typedef" href="namespaceripple.html#a0356489dd518b8dc89a1153048cb4aee">stream_type</a> = boost::beast::ssl_stream&lt;socket_type&gt;;</div>
<div class="line"><a id="l00024" name="l00024"></a><span class="lineno"><a class="line" href="namespaceripple.html#aca9c2c7a74ddd4a436b5984f6a265621"> 24</a></span><span class="keyword">using </span><a class="code hl_typedef" href="namespaceripple.html#aca9c2c7a74ddd4a436b5984f6a265621">request_type</a> =</div>
<div class="line"><a id="l00025" name="l00025"></a><span class="lineno"> 25</span> boost::beast::http::request&lt;boost::beast::http::empty_body&gt;;</div>
<div class="line"><a id="l00026" name="l00026"></a><span class="lineno"> 26</span><span class="keyword">using </span><a class="code hl_typedef" href="namespaceripple.html#aa265217edeb8282e636c78b50049f4c0">http_request_type</a> =</div>
<div class="line"><a id="l00027" name="l00027"></a><span class="lineno"> 27</span> boost::beast::http::request&lt;boost::beast::http::dynamic_body&gt;;</div>
<div class="line"><a id="l00028" name="l00028"></a><span class="lineno"> 28</span><span class="keyword">using </span><a class="code hl_typedef" href="namespaceripple.html#a2581fa85c4291f16bf9e17d78615d584">http_response_type</a> =</div>
<div class="line"><a id="l00029" name="l00029"></a><span class="lineno"> 29</span> boost::beast::http::response&lt;boost::beast::http::dynamic_body&gt;;</div>
<div class="line"><a id="l00030" name="l00030"></a><span class="lineno"> 30</span> </div>
<div class="line"><a id="l00040" name="l00040"></a><span class="lineno"> 40</span><a class="code hl_classRef" href="http://en.cppreference.com/w/cpp/utility/optional.html">std::optional&lt;uint256&gt;</a></div>
<div class="line"><a id="l00041" name="l00041"></a><span class="lineno"> 41</span><a class="code hl_function" href="namespaceripple.html#a7241d07322a0d8fa2e2effedd739a90f">makeSharedValue</a>(<a class="code hl_typedef" href="namespaceripple.html#a0356489dd518b8dc89a1153048cb4aee">stream_type</a>&amp; ssl, <a class="code hl_class" href="classbeast_1_1Journal.html">beast::Journal</a> journal);</div>
<div class="line"><a id="l00042" name="l00042"></a><span class="lineno"> 42</span> </div>
<div class="line"><a id="l00045" name="l00045"></a><span class="lineno"> 45</span><span class="keywordtype">void</span></div>
<div class="line"><a id="l00046" name="l00046"></a><span class="lineno"> 46</span><a class="code hl_function" href="namespaceripple.html#a2f6f4c48edfa4bab7857fc6d554d0bcf">buildHandshake</a>(</div>
<div class="line"><a id="l00047" name="l00047"></a><span class="lineno"> 47</span> boost::beast::http::fields&amp; h,</div>
<div class="line"><a id="l00048" name="l00048"></a><span class="lineno"> 48</span> <a class="code hl_class" href="classripple_1_1base__uint.html">uint256</a> <span class="keyword">const</span>&amp; sharedValue,</div>
<div class="line"><a id="l00049" name="l00049"></a><span class="lineno"> 49</span> <a class="code hl_classRef" href="http://en.cppreference.com/w/cpp/utility/optional.html">std::optional&lt;std::uint32_t&gt;</a> networkID,</div>
<div class="line"><a id="l00050" name="l00050"></a><span class="lineno"> 50</span> <a class="code hl_typedef" href="namespacebeast_1_1IP.html#adbe597760cb20a7aa3f2ff92f7bed2cc">beast::IP::Address</a> public_ip,</div>
<div class="line"><a id="l00051" name="l00051"></a><span class="lineno"> 51</span> <a class="code hl_typedef" href="namespacebeast_1_1IP.html#adbe597760cb20a7aa3f2ff92f7bed2cc">beast::IP::Address</a> remote_ip,</div>
<div class="line"><a id="l00052" name="l00052"></a><span class="lineno"> 52</span> <a class="code hl_class" href="classripple_1_1Application.html">Application</a>&amp; app);</div>
<div class="line"><a id="l00053" name="l00053"></a><span class="lineno"> 53</span> </div>
<div class="line"><a id="l00065" name="l00065"></a><span class="lineno"> 65</span><a class="code hl_class" href="classripple_1_1PublicKey.html">PublicKey</a></div>
<div class="line"><a id="l00066" name="l00066"></a><span class="lineno"> 66</span><a class="code hl_function" href="namespaceripple.html#acd7881ae39681c7d64a5904b367219ab">verifyHandshake</a>(</div>
<div class="line"><a id="l00067" name="l00067"></a><span class="lineno"> 67</span> boost::beast::http::fields <span class="keyword">const</span>&amp; headers,</div>
<div class="line"><a id="l00068" name="l00068"></a><span class="lineno"> 68</span> <a class="code hl_class" href="classripple_1_1base__uint.html">uint256</a> <span class="keyword">const</span>&amp; sharedValue,</div>
<div class="line"><a id="l00069" name="l00069"></a><span class="lineno"> 69</span> <a class="code hl_classRef" href="http://en.cppreference.com/w/cpp/utility/optional.html">std::optional&lt;std::uint32_t&gt;</a> networkID,</div>
<div class="line"><a id="l00070" name="l00070"></a><span class="lineno"> 70</span> <a class="code hl_typedef" href="namespacebeast_1_1IP.html#adbe597760cb20a7aa3f2ff92f7bed2cc">beast::IP::Address</a> public_ip,</div>
<div class="line"><a id="l00071" name="l00071"></a><span class="lineno"> 71</span> <a class="code hl_typedef" href="namespacebeast_1_1IP.html#adbe597760cb20a7aa3f2ff92f7bed2cc">beast::IP::Address</a> remote,</div>
<div class="line"><a id="l00072" name="l00072"></a><span class="lineno"> 72</span> <a class="code hl_class" href="classripple_1_1Application.html">Application</a>&amp; app);</div>
<div class="line"><a id="l00073" name="l00073"></a><span class="lineno"> 73</span> </div>
<div class="line"><a id="l00085" name="l00085"></a><span class="lineno"> 85</span><a class="code hl_typedef" href="namespaceripple.html#aca9c2c7a74ddd4a436b5984f6a265621">request_type</a></div>
<div class="line"><a id="l00086" name="l00086"></a><span class="lineno"> 86</span><a class="code hl_function" href="namespaceripple.html#ac35dc55d3f3c259f344225586a8887b4">makeRequest</a>(</div>
<div class="line"><a id="l00087" name="l00087"></a><span class="lineno"> 87</span> <span class="keywordtype">bool</span> crawlPublic,</div>
<div class="line"><a id="l00088" name="l00088"></a><span class="lineno"> 88</span> <span class="keywordtype">bool</span> comprEnabled,</div>
<div class="line"><a id="l00089" name="l00089"></a><span class="lineno"> 89</span> <span class="keywordtype">bool</span> ledgerReplayEnabled,</div>
<div class="line"><a id="l00090" name="l00090"></a><span class="lineno"> 90</span> <span class="keywordtype">bool</span> txReduceRelayEnabled,</div>
<div class="line"><a id="l00091" name="l00091"></a><span class="lineno"> 91</span> <span class="keywordtype">bool</span> vpReduceRelayEnabled);</div>
<div class="line"><a id="l00092" name="l00092"></a><span class="lineno"> 92</span> </div>
<div class="line"><a id="l00104" name="l00104"></a><span class="lineno"> 104</span><a class="code hl_typedef" href="namespaceripple.html#aca9c2c7a74ddd4a436b5984f6a265621">request_type</a></div>
<div class="line"><a id="l00105" name="l00105"></a><span class="lineno"> 105</span><a class="code hl_function" href="namespaceripple.html#ac35dc55d3f3c259f344225586a8887b4">makeRequest</a>(</div>
<div class="line"><a id="l00106" name="l00106"></a><span class="lineno"> 106</span> <span class="keywordtype">bool</span> crawlPublic,</div>
<div class="line"><a id="l00107" name="l00107"></a><span class="lineno"> 107</span> <span class="keywordtype">bool</span> comprEnabled,</div>
<div class="line"><a id="l00108" name="l00108"></a><span class="lineno"> 108</span> <span class="keywordtype">bool</span> ledgerReplayEnabled,</div>
<div class="line"><a id="l00109" name="l00109"></a><span class="lineno"> 109</span> <span class="keywordtype">bool</span> txReduceRelayEnabled,</div>
<div class="line"><a id="l00110" name="l00110"></a><span class="lineno"> 110</span> <span class="keywordtype">bool</span> vpReduceRelayEnabled);</div>
<div class="line"><a id="l00111" name="l00111"></a><span class="lineno"> 111</span> </div>
<div class="line"><a id="l00124" name="l00124"></a><span class="lineno"> 124</span><a class="code hl_typedef" href="namespaceripple.html#a2581fa85c4291f16bf9e17d78615d584">http_response_type</a></div>
<div class="line"><a id="l00125" name="l00125"></a><span class="lineno"> 125</span><a class="code hl_function" href="namespaceripple.html#a5590ae6006b178275628bde91fa03129">makeResponse</a>(</div>
<div class="line"><a id="l00126" name="l00126"></a><span class="lineno"> 126</span> <span class="keywordtype">bool</span> crawlPublic,</div>
<div class="line"><a id="l00127" name="l00127"></a><span class="lineno"> 127</span> <a class="code hl_typedef" href="namespaceripple.html#aa265217edeb8282e636c78b50049f4c0">http_request_type</a> <span class="keyword">const</span>&amp; req,</div>
<div class="line"><a id="l00128" name="l00128"></a><span class="lineno"> 128</span> <a class="code hl_typedef" href="namespacebeast_1_1IP.html#adbe597760cb20a7aa3f2ff92f7bed2cc">beast::IP::Address</a> public_ip,</div>
<div class="line"><a id="l00129" name="l00129"></a><span class="lineno"> 129</span> <a class="code hl_typedef" href="namespacebeast_1_1IP.html#adbe597760cb20a7aa3f2ff92f7bed2cc">beast::IP::Address</a> remote_ip,</div>
<div class="line"><a id="l00130" name="l00130"></a><span class="lineno"> 130</span> <a class="code hl_class" href="classripple_1_1base__uint.html">uint256</a> <span class="keyword">const</span>&amp; sharedValue,</div>
<div class="line"><a id="l00131" name="l00131"></a><span class="lineno"> 131</span> <a class="code hl_classRef" href="http://en.cppreference.com/w/cpp/utility/optional.html">std::optional&lt;std::uint32_t&gt;</a> networkID,</div>
<div class="line"><a id="l00132" name="l00132"></a><span class="lineno"> 132</span> <a class="code hl_classRef" href="http://en.cppreference.com/w/cpp/utility/pair.html">ProtocolVersion</a> version,</div>
<div class="line"><a id="l00133" name="l00133"></a><span class="lineno"> 133</span> <a class="code hl_class" href="classripple_1_1Application.html">Application</a>&amp; app);</div>
<div class="line"><a id="l00134" name="l00134"></a><span class="lineno"> 134</span> </div>
<div class="line"><a id="l00135" name="l00135"></a><span class="lineno"> 135</span><span class="comment">// Protocol features negotiated via HTTP handshake.</span></div>
<div class="line"><a id="l00136" name="l00136"></a><span class="lineno"> 136</span><span class="comment">// The format is:</span></div>
<div class="line"><a id="l00137" name="l00137"></a><span class="lineno"> 137</span><span class="comment">// X-Protocol-Ctl: feature1=value1[,value2]*[\s*;\s*feature2=value1[,value2]*]*</span></div>
<div class="line"><a id="l00138" name="l00138"></a><span class="lineno"> 138</span><span class="comment">// value: \S+</span></div>
<div class="line"><a id="l00139" name="l00139"></a><span class="lineno"> 139</span> </div>
<div class="line"><a id="l00140" name="l00140"></a><span class="lineno"> 140</span><span class="comment">// compression feature</span></div>
<div class="line"><a id="l00141" name="l00141"></a><span class="lineno"><a class="line" href="namespaceripple.html#a329f20572687d73e31094b0717ea7424"> 141</a></span><span class="keyword">static</span> <span class="keyword">constexpr</span> <span class="keywordtype">char</span> <a class="code hl_variable" href="namespaceripple.html#a329f20572687d73e31094b0717ea7424">FEATURE_COMPR</a>[] = <span class="stringliteral">&quot;compr&quot;</span>;</div>
<div class="line"><a id="l00142" name="l00142"></a><span class="lineno"> 142</span><span class="comment">// validation/proposal reduce-relay base squelch feature</span></div>
<div class="line"><a id="l00143" name="l00143"></a><span class="lineno"><a class="line" href="namespaceripple.html#af8096ae8c38e0d57b54d62311a0ae0e3"> 143</a></span><span class="keyword">static</span> <span class="keyword">constexpr</span> <span class="keywordtype">char</span> <a class="code hl_variable" href="namespaceripple.html#af8096ae8c38e0d57b54d62311a0ae0e3">FEATURE_VPRR</a>[] = <span class="stringliteral">&quot;vprr&quot;</span>;</div>
<div class="line"><a id="l00144" name="l00144"></a><span class="lineno"> 144</span><span class="comment">// transaction reduce-relay feature</span></div>
<div class="line"><a id="l00145" name="l00145"></a><span class="lineno"><a class="line" href="namespaceripple.html#abfa1036f5269ce11a14cb8a8680dbc3e"> 145</a></span><span class="keyword">static</span> <span class="keyword">constexpr</span> <span class="keywordtype">char</span> <a class="code hl_variable" href="namespaceripple.html#abfa1036f5269ce11a14cb8a8680dbc3e">FEATURE_TXRR</a>[] = <span class="stringliteral">&quot;txrr&quot;</span>;</div>
<div class="line"><a id="l00146" name="l00146"></a><span class="lineno"> 146</span><span class="comment">// ledger replay</span></div>
<div class="line"><a id="l00147" name="l00147"></a><span class="lineno"><a class="line" href="namespaceripple.html#a59334776ad7699c39ec3683f1fca4b2e"> 147</a></span><span class="keyword">static</span> <span class="keyword">constexpr</span> <span class="keywordtype">char</span> <a class="code hl_variable" href="namespaceripple.html#a59334776ad7699c39ec3683f1fca4b2e">FEATURE_LEDGER_REPLAY</a>[] = <span class="stringliteral">&quot;ledgerreplay&quot;</span>;</div>
<div class="line"><a id="l00148" name="l00148"></a><span class="lineno"><a class="line" href="namespaceripple.html#a201121472e8bff3b8d8eef7a2ef84b11"> 148</a></span><span class="keyword">static</span> <span class="keyword">constexpr</span> <span class="keywordtype">char</span> <a class="code hl_variable" href="namespaceripple.html#a201121472e8bff3b8d8eef7a2ef84b11">DELIM_FEATURE</a>[] = <span class="stringliteral">&quot;;&quot;</span>;</div>
<div class="line"><a id="l00149" name="l00149"></a><span class="lineno"><a class="line" href="namespaceripple.html#a3626d08bac9baa6b3480e2e5ebe91682"> 149</a></span><span class="keyword">static</span> <span class="keyword">constexpr</span> <span class="keywordtype">char</span> <a class="code hl_variable" href="namespaceripple.html#a3626d08bac9baa6b3480e2e5ebe91682">DELIM_VALUE</a>[] = <span class="stringliteral">&quot;,&quot;</span>;</div>
<div class="line"><a id="l00150" name="l00150"></a><span class="lineno"> 150</span> </div>
<div class="line"><a id="l00157" name="l00157"></a><span class="lineno"> 157</span><a class="code hl_classRef" href="http://en.cppreference.com/w/cpp/utility/optional.html">std::optional&lt;std::string&gt;</a></div>
<div class="line"><a id="l00158" name="l00158"></a><span class="lineno"> 158</span><a class="code hl_function" href="namespaceripple.html#ab289776c60bd705e640136f8248adff9">getFeatureValue</a>(</div>
<div class="line"><a id="l00159" name="l00159"></a><span class="lineno"> 159</span> boost::beast::http::fields <span class="keyword">const</span>&amp; headers,</div>
<div class="line"><a id="l00160" name="l00160"></a><span class="lineno"> 160</span> <a class="code hl_classRef" href="http://en.cppreference.com/w/cpp/string/basic_string.html">std::string</a> <span class="keyword">const</span>&amp; feature);</div>
<div class="line"><a id="l00161" name="l00161"></a><span class="lineno"> 161</span> </div>
<div class="line"><a id="l00170" name="l00170"></a><span class="lineno"> 170</span><span class="keywordtype">bool</span></div>
<div class="line"><a id="l00171" name="l00171"></a><span class="lineno"> 171</span><a class="code hl_function" href="namespaceripple.html#a6d7b29582ed0ce64ee27f482ae5f96ba">isFeatureValue</a>(</div>
<div class="line"><a id="l00172" name="l00172"></a><span class="lineno"> 172</span> boost::beast::http::fields <span class="keyword">const</span>&amp; headers,</div>
<div class="line"><a id="l00173" name="l00173"></a><span class="lineno"> 173</span> <a class="code hl_classRef" href="http://en.cppreference.com/w/cpp/string/basic_string.html">std::string</a> <span class="keyword">const</span>&amp; feature,</div>
<div class="line"><a id="l00174" name="l00174"></a><span class="lineno"> 174</span> <a class="code hl_classRef" href="http://en.cppreference.com/w/cpp/string/basic_string.html">std::string</a> <span class="keyword">const</span>&amp; value);</div>
<div class="line"><a id="l00175" name="l00175"></a><span class="lineno"> 175</span> </div>
<div class="line"><a id="l00181" name="l00181"></a><span class="lineno"> 181</span><span class="keywordtype">bool</span></div>
<div class="line"><a id="l00182" name="l00182"></a><span class="lineno"> 182</span><a class="code hl_function" href="namespaceripple.html#aa479458839503ea9da8953313824886b">featureEnabled</a>(</div>
<div class="line"><a id="l00183" name="l00183"></a><span class="lineno"> 183</span> boost::beast::http::fields <span class="keyword">const</span>&amp; headers,</div>
<div class="line"><a id="l00184" name="l00184"></a><span class="lineno"> 184</span> <a class="code hl_classRef" href="http://en.cppreference.com/w/cpp/string/basic_string.html">std::string</a> <span class="keyword">const</span>&amp; feature);</div>
<div class="line"><a id="l00185" name="l00185"></a><span class="lineno"> 185</span> </div>
<div class="line"><a id="l00196" name="l00196"></a><span class="lineno"> 196</span><span class="keyword">template</span> &lt;<span class="keyword">typename</span> headers&gt;</div>
<div class="line"><a id="l00197" name="l00197"></a><span class="lineno"> 197</span><span class="keywordtype">bool</span></div>
<div class="foldopen" id="foldopen00198" data-start="{" data-end="}">
<div class="line"><a id="l00198" name="l00198"></a><span class="lineno"><a class="line" href="namespaceripple.html#ab58cf24607744c98d521c3e97aca2a53"> 198</a></span><a class="code hl_function" href="namespaceripple.html#ab58cf24607744c98d521c3e97aca2a53">peerFeatureEnabled</a>(</div>
<div class="line"><a id="l00199" name="l00199"></a><span class="lineno"> 199</span> headers <span class="keyword">const</span>&amp; request,</div>
<div class="line"><a id="l00200" name="l00200"></a><span class="lineno"> 200</span> <a class="code hl_classRef" href="http://en.cppreference.com/w/cpp/string/basic_string.html">std::string</a> <span class="keyword">const</span>&amp; feature,</div>
<div class="line"><a id="l00201" name="l00201"></a><span class="lineno"> 201</span> <a class="code hl_classRef" href="http://en.cppreference.com/w/cpp/string/basic_string.html">std::string</a> value,</div>
<div class="line"><a id="l00202" name="l00202"></a><span class="lineno"> 202</span> <span class="keywordtype">bool</span> config)</div>
<div class="line"><a id="l00203" name="l00203"></a><span class="lineno"> 203</span>{</div>
<div class="line"><a id="l00204" name="l00204"></a><span class="lineno"> 204</span> <span class="keywordflow">return</span> config &amp;&amp; <a class="code hl_function" href="namespaceripple.html#a6d7b29582ed0ce64ee27f482ae5f96ba">isFeatureValue</a>(request, feature, value);</div>
<div class="line"><a id="l00205" name="l00205"></a><span class="lineno"> 205</span>}</div>
<div class="line"><a id="l00105" name="l00105"></a><span class="lineno"> 105</span><a class="code hl_typedef" href="namespaceripple.html#a2581fa85c4291f16bf9e17d78615d584">http_response_type</a></div>
<div class="line"><a id="l00106" name="l00106"></a><span class="lineno"> 106</span><a class="code hl_function" href="namespaceripple.html#a5590ae6006b178275628bde91fa03129">makeResponse</a>(</div>
<div class="line"><a id="l00107" name="l00107"></a><span class="lineno"> 107</span> <span class="keywordtype">bool</span> crawlPublic,</div>
<div class="line"><a id="l00108" name="l00108"></a><span class="lineno"> 108</span> <a class="code hl_typedef" href="namespaceripple.html#aa265217edeb8282e636c78b50049f4c0">http_request_type</a> <span class="keyword">const</span>&amp; req,</div>
<div class="line"><a id="l00109" name="l00109"></a><span class="lineno"> 109</span> <a class="code hl_typedef" href="namespacebeast_1_1IP.html#adbe597760cb20a7aa3f2ff92f7bed2cc">beast::IP::Address</a> public_ip,</div>
<div class="line"><a id="l00110" name="l00110"></a><span class="lineno"> 110</span> <a class="code hl_typedef" href="namespacebeast_1_1IP.html#adbe597760cb20a7aa3f2ff92f7bed2cc">beast::IP::Address</a> remote_ip,</div>
<div class="line"><a id="l00111" name="l00111"></a><span class="lineno"> 111</span> <a class="code hl_class" href="classripple_1_1base__uint.html">uint256</a> <span class="keyword">const</span>&amp; sharedValue,</div>
<div class="line"><a id="l00112" name="l00112"></a><span class="lineno"> 112</span> <a class="code hl_classRef" href="http://en.cppreference.com/w/cpp/utility/optional.html">std::optional&lt;std::uint32_t&gt;</a> networkID,</div>
<div class="line"><a id="l00113" name="l00113"></a><span class="lineno"> 113</span> <a class="code hl_classRef" href="http://en.cppreference.com/w/cpp/utility/pair.html">ProtocolVersion</a> version,</div>
<div class="line"><a id="l00114" name="l00114"></a><span class="lineno"> 114</span> <a class="code hl_class" href="classripple_1_1Application.html">Application</a>&amp; app);</div>
<div class="line"><a id="l00115" name="l00115"></a><span class="lineno"> 115</span> </div>
<div class="line"><a id="l00116" name="l00116"></a><span class="lineno"> 116</span><span class="comment">// Protocol features negotiated via HTTP handshake.</span></div>
<div class="line"><a id="l00117" name="l00117"></a><span class="lineno"> 117</span><span class="comment">// The format is:</span></div>
<div class="line"><a id="l00118" name="l00118"></a><span class="lineno"> 118</span><span class="comment">// X-Protocol-Ctl: feature1=value1[,value2]*[\s*;\s*feature2=value1[,value2]*]*</span></div>
<div class="line"><a id="l00119" name="l00119"></a><span class="lineno"> 119</span><span class="comment">// value: \S+</span></div>
<div class="line"><a id="l00120" name="l00120"></a><span class="lineno"> 120</span> </div>
<div class="line"><a id="l00121" name="l00121"></a><span class="lineno"> 121</span><span class="comment">// compression feature</span></div>
<div class="line"><a id="l00122" name="l00122"></a><span class="lineno"><a class="line" href="namespaceripple.html#a329f20572687d73e31094b0717ea7424"> 122</a></span><span class="keyword">static</span> <span class="keyword">constexpr</span> <span class="keywordtype">char</span> <a class="code hl_variable" href="namespaceripple.html#a329f20572687d73e31094b0717ea7424">FEATURE_COMPR</a>[] = <span class="stringliteral">&quot;compr&quot;</span>;</div>
<div class="line"><a id="l00123" name="l00123"></a><span class="lineno"> 123</span><span class="comment">// validation/proposal reduce-relay base squelch feature</span></div>
<div class="line"><a id="l00124" name="l00124"></a><span class="lineno"><a class="line" href="namespaceripple.html#af8096ae8c38e0d57b54d62311a0ae0e3"> 124</a></span><span class="keyword">static</span> <span class="keyword">constexpr</span> <span class="keywordtype">char</span> <a class="code hl_variable" href="namespaceripple.html#af8096ae8c38e0d57b54d62311a0ae0e3">FEATURE_VPRR</a>[] = <span class="stringliteral">&quot;vprr&quot;</span>;</div>
<div class="line"><a id="l00125" name="l00125"></a><span class="lineno"> 125</span><span class="comment">// transaction reduce-relay feature</span></div>
<div class="line"><a id="l00126" name="l00126"></a><span class="lineno"><a class="line" href="namespaceripple.html#abfa1036f5269ce11a14cb8a8680dbc3e"> 126</a></span><span class="keyword">static</span> <span class="keyword">constexpr</span> <span class="keywordtype">char</span> <a class="code hl_variable" href="namespaceripple.html#abfa1036f5269ce11a14cb8a8680dbc3e">FEATURE_TXRR</a>[] = <span class="stringliteral">&quot;txrr&quot;</span>;</div>
<div class="line"><a id="l00127" name="l00127"></a><span class="lineno"> 127</span><span class="comment">// ledger replay</span></div>
<div class="line"><a id="l00128" name="l00128"></a><span class="lineno"><a class="line" href="namespaceripple.html#a59334776ad7699c39ec3683f1fca4b2e"> 128</a></span><span class="keyword">static</span> <span class="keyword">constexpr</span> <span class="keywordtype">char</span> <a class="code hl_variable" href="namespaceripple.html#a59334776ad7699c39ec3683f1fca4b2e">FEATURE_LEDGER_REPLAY</a>[] = <span class="stringliteral">&quot;ledgerreplay&quot;</span>;</div>
<div class="line"><a id="l00129" name="l00129"></a><span class="lineno"><a class="line" href="namespaceripple.html#a201121472e8bff3b8d8eef7a2ef84b11"> 129</a></span><span class="keyword">static</span> <span class="keyword">constexpr</span> <span class="keywordtype">char</span> <a class="code hl_variable" href="namespaceripple.html#a201121472e8bff3b8d8eef7a2ef84b11">DELIM_FEATURE</a>[] = <span class="stringliteral">&quot;;&quot;</span>;</div>
<div class="line"><a id="l00130" name="l00130"></a><span class="lineno"><a class="line" href="namespaceripple.html#a3626d08bac9baa6b3480e2e5ebe91682"> 130</a></span><span class="keyword">static</span> <span class="keyword">constexpr</span> <span class="keywordtype">char</span> <a class="code hl_variable" href="namespaceripple.html#a3626d08bac9baa6b3480e2e5ebe91682">DELIM_VALUE</a>[] = <span class="stringliteral">&quot;,&quot;</span>;</div>
<div class="line"><a id="l00131" name="l00131"></a><span class="lineno"> 131</span> </div>
<div class="line"><a id="l00138" name="l00138"></a><span class="lineno"> 138</span><a class="code hl_classRef" href="http://en.cppreference.com/w/cpp/utility/optional.html">std::optional&lt;std::string&gt;</a></div>
<div class="line"><a id="l00139" name="l00139"></a><span class="lineno"> 139</span><a class="code hl_function" href="namespaceripple.html#ab289776c60bd705e640136f8248adff9">getFeatureValue</a>(</div>
<div class="line"><a id="l00140" name="l00140"></a><span class="lineno"> 140</span> boost::beast::http::fields <span class="keyword">const</span>&amp; headers,</div>
<div class="line"><a id="l00141" name="l00141"></a><span class="lineno"> 141</span> <a class="code hl_classRef" href="http://en.cppreference.com/w/cpp/string/basic_string.html">std::string</a> <span class="keyword">const</span>&amp; feature);</div>
<div class="line"><a id="l00142" name="l00142"></a><span class="lineno"> 142</span> </div>
<div class="line"><a id="l00151" name="l00151"></a><span class="lineno"> 151</span><span class="keywordtype">bool</span></div>
<div class="line"><a id="l00152" name="l00152"></a><span class="lineno"> 152</span><a class="code hl_function" href="namespaceripple.html#a6d7b29582ed0ce64ee27f482ae5f96ba">isFeatureValue</a>(</div>
<div class="line"><a id="l00153" name="l00153"></a><span class="lineno"> 153</span> boost::beast::http::fields <span class="keyword">const</span>&amp; headers,</div>
<div class="line"><a id="l00154" name="l00154"></a><span class="lineno"> 154</span> <a class="code hl_classRef" href="http://en.cppreference.com/w/cpp/string/basic_string.html">std::string</a> <span class="keyword">const</span>&amp; feature,</div>
<div class="line"><a id="l00155" name="l00155"></a><span class="lineno"> 155</span> <a class="code hl_classRef" href="http://en.cppreference.com/w/cpp/string/basic_string.html">std::string</a> <span class="keyword">const</span>&amp; value);</div>
<div class="line"><a id="l00156" name="l00156"></a><span class="lineno"> 156</span> </div>
<div class="line"><a id="l00162" name="l00162"></a><span class="lineno"> 162</span><span class="keywordtype">bool</span></div>
<div class="line"><a id="l00163" name="l00163"></a><span class="lineno"> 163</span><a class="code hl_function" href="namespaceripple.html#aa479458839503ea9da8953313824886b">featureEnabled</a>(</div>
<div class="line"><a id="l00164" name="l00164"></a><span class="lineno"> 164</span> boost::beast::http::fields <span class="keyword">const</span>&amp; headers,</div>
<div class="line"><a id="l00165" name="l00165"></a><span class="lineno"> 165</span> <a class="code hl_classRef" href="http://en.cppreference.com/w/cpp/string/basic_string.html">std::string</a> <span class="keyword">const</span>&amp; feature);</div>
<div class="line"><a id="l00166" name="l00166"></a><span class="lineno"> 166</span> </div>
<div class="line"><a id="l00177" name="l00177"></a><span class="lineno"> 177</span><span class="keyword">template</span> &lt;<span class="keyword">typename</span> headers&gt;</div>
<div class="line"><a id="l00178" name="l00178"></a><span class="lineno"> 178</span><span class="keywordtype">bool</span></div>
<div class="foldopen" id="foldopen00179" data-start="{" data-end="}">
<div class="line"><a id="l00179" name="l00179"></a><span class="lineno"><a class="line" href="namespaceripple.html#ab58cf24607744c98d521c3e97aca2a53"> 179</a></span><a class="code hl_function" href="namespaceripple.html#ab58cf24607744c98d521c3e97aca2a53">peerFeatureEnabled</a>(</div>
<div class="line"><a id="l00180" name="l00180"></a><span class="lineno"> 180</span> headers <span class="keyword">const</span>&amp; request,</div>
<div class="line"><a id="l00181" name="l00181"></a><span class="lineno"> 181</span> <a class="code hl_classRef" href="http://en.cppreference.com/w/cpp/string/basic_string.html">std::string</a> <span class="keyword">const</span>&amp; feature,</div>
<div class="line"><a id="l00182" name="l00182"></a><span class="lineno"> 182</span> <a class="code hl_classRef" href="http://en.cppreference.com/w/cpp/string/basic_string.html">std::string</a> value,</div>
<div class="line"><a id="l00183" name="l00183"></a><span class="lineno"> 183</span> <span class="keywordtype">bool</span> config)</div>
<div class="line"><a id="l00184" name="l00184"></a><span class="lineno"> 184</span>{</div>
<div class="line"><a id="l00185" name="l00185"></a><span class="lineno"> 185</span> <span class="keywordflow">return</span> config &amp;&amp; <a class="code hl_function" href="namespaceripple.html#a6d7b29582ed0ce64ee27f482ae5f96ba">isFeatureValue</a>(request, feature, value);</div>
<div class="line"><a id="l00186" name="l00186"></a><span class="lineno"> 186</span>}</div>
</div>
<div class="line"><a id="l00206" name="l00206"></a><span class="lineno"> 206</span> </div>
<div class="line"><a id="l00208" name="l00208"></a><span class="lineno"> 208</span><span class="keyword">template</span> &lt;<span class="keyword">typename</span> headers&gt;</div>
<div class="line"><a id="l00209" name="l00209"></a><span class="lineno"> 209</span><span class="keywordtype">bool</span></div>
<div class="foldopen" id="foldopen00210" data-start="{" data-end="}">
<div class="line"><a id="l00210" name="l00210"></a><span class="lineno"><a class="line" href="namespaceripple.html#afa68890c5d61f277f7e40b3e52a339c8"> 210</a></span><a class="code hl_function" href="namespaceripple.html#ab58cf24607744c98d521c3e97aca2a53">peerFeatureEnabled</a>(</div>
<div class="line"><a id="l00211" name="l00211"></a><span class="lineno"> 211</span> headers <span class="keyword">const</span>&amp; request,</div>
<div class="line"><a id="l00212" name="l00212"></a><span class="lineno"> 212</span> <a class="code hl_classRef" href="http://en.cppreference.com/w/cpp/string/basic_string.html">std::string</a> <span class="keyword">const</span>&amp; feature,</div>
<div class="line"><a id="l00213" name="l00213"></a><span class="lineno"> 213</span> <span class="keywordtype">bool</span> config)</div>
<div class="line"><a id="l00214" name="l00214"></a><span class="lineno"> 214</span>{</div>
<div class="line"><a id="l00215" name="l00215"></a><span class="lineno"> 215</span> <span class="keywordflow">return</span> config &amp;&amp; <a class="code hl_function" href="namespaceripple.html#ab58cf24607744c98d521c3e97aca2a53">peerFeatureEnabled</a>(request, feature, <span class="stringliteral">&quot;1&quot;</span>, config);</div>
<div class="line"><a id="l00216" name="l00216"></a><span class="lineno"> 216</span>}</div>
<div class="line"><a id="l00187" name="l00187"></a><span class="lineno"> 187</span> </div>
<div class="line"><a id="l00189" name="l00189"></a><span class="lineno"> 189</span><span class="keyword">template</span> &lt;<span class="keyword">typename</span> headers&gt;</div>
<div class="line"><a id="l00190" name="l00190"></a><span class="lineno"> 190</span><span class="keywordtype">bool</span></div>
<div class="foldopen" id="foldopen00191" data-start="{" data-end="}">
<div class="line"><a id="l00191" name="l00191"></a><span class="lineno"><a class="line" href="namespaceripple.html#afa68890c5d61f277f7e40b3e52a339c8"> 191</a></span><a class="code hl_function" href="namespaceripple.html#ab58cf24607744c98d521c3e97aca2a53">peerFeatureEnabled</a>(</div>
<div class="line"><a id="l00192" name="l00192"></a><span class="lineno"> 192</span> headers <span class="keyword">const</span>&amp; request,</div>
<div class="line"><a id="l00193" name="l00193"></a><span class="lineno"> 193</span> <a class="code hl_classRef" href="http://en.cppreference.com/w/cpp/string/basic_string.html">std::string</a> <span class="keyword">const</span>&amp; feature,</div>
<div class="line"><a id="l00194" name="l00194"></a><span class="lineno"> 194</span> <span class="keywordtype">bool</span> config)</div>
<div class="line"><a id="l00195" name="l00195"></a><span class="lineno"> 195</span>{</div>
<div class="line"><a id="l00196" name="l00196"></a><span class="lineno"> 196</span> <span class="keywordflow">return</span> config &amp;&amp; <a class="code hl_function" href="namespaceripple.html#ab58cf24607744c98d521c3e97aca2a53">peerFeatureEnabled</a>(request, feature, <span class="stringliteral">&quot;1&quot;</span>, config);</div>
<div class="line"><a id="l00197" name="l00197"></a><span class="lineno"> 197</span>}</div>
</div>
<div class="line"><a id="l00217" name="l00217"></a><span class="lineno"> 217</span> </div>
<div class="line"><a id="l00227" name="l00227"></a><span class="lineno"> 227</span><a class="code hl_classRef" href="http://en.cppreference.com/w/cpp/string/basic_string.html">std::string</a></div>
<div class="line"><a id="l00228" name="l00228"></a><span class="lineno"> 228</span><a class="code hl_function" href="namespaceripple.html#a3b64d9e22ab9ae2c1f8957809f69d9b0">makeFeaturesRequestHeader</a>(</div>
<div class="line"><a id="l00229" name="l00229"></a><span class="lineno"> 229</span> <span class="keywordtype">bool</span> comprEnabled,</div>
<div class="line"><a id="l00230" name="l00230"></a><span class="lineno"> 230</span> <span class="keywordtype">bool</span> ledgerReplayEnabled,</div>
<div class="line"><a id="l00231" name="l00231"></a><span class="lineno"> 231</span> <span class="keywordtype">bool</span> txReduceRelayEnabled,</div>
<div class="line"><a id="l00232" name="l00232"></a><span class="lineno"> 232</span> <span class="keywordtype">bool</span> vpReduceRelayEnabled);</div>
<div class="line"><a id="l00233" name="l00233"></a><span class="lineno"> 233</span> </div>
<div class="line"><a id="l00247" name="l00247"></a><span class="lineno"> 247</span><a class="code hl_classRef" href="http://en.cppreference.com/w/cpp/string/basic_string.html">std::string</a></div>
<div class="line"><a id="l00248" name="l00248"></a><span class="lineno"> 248</span><a class="code hl_function" href="namespaceripple.html#a0a0ee63f1430dcca0ca6e0b06ca53998">makeFeaturesResponseHeader</a>(</div>
<div class="line"><a id="l00249" name="l00249"></a><span class="lineno"> 249</span> <a class="code hl_typedef" href="namespaceripple.html#aa265217edeb8282e636c78b50049f4c0">http_request_type</a> <span class="keyword">const</span>&amp; headers,</div>
<div class="line"><a id="l00250" name="l00250"></a><span class="lineno"> 250</span> <span class="keywordtype">bool</span> comprEnabled,</div>
<div class="line"><a id="l00251" name="l00251"></a><span class="lineno"> 251</span> <span class="keywordtype">bool</span> ledgerReplayEnabled,</div>
<div class="line"><a id="l00252" name="l00252"></a><span class="lineno"> 252</span> <span class="keywordtype">bool</span> txReduceRelayEnabled,</div>
<div class="line"><a id="l00253" name="l00253"></a><span class="lineno"> 253</span> <span class="keywordtype">bool</span> vpReduceRelayEnabled);</div>
<div class="line"><a id="l00254" name="l00254"></a><span class="lineno"> 254</span> </div>
<div class="line"><a id="l00255" name="l00255"></a><span class="lineno"> 255</span>} <span class="comment">// namespace ripple</span></div>
<div class="line"><a id="l00256" name="l00256"></a><span class="lineno"> 256</span> </div>
<div class="line"><a id="l00257" name="l00257"></a><span class="lineno"> 257</span><span class="preprocessor">#endif</span></div>
<div class="line"><a id="l00198" name="l00198"></a><span class="lineno"> 198</span> </div>
<div class="line"><a id="l00208" name="l00208"></a><span class="lineno"> 208</span><a class="code hl_classRef" href="http://en.cppreference.com/w/cpp/string/basic_string.html">std::string</a></div>
<div class="line"><a id="l00209" name="l00209"></a><span class="lineno"> 209</span><a class="code hl_function" href="namespaceripple.html#a3b64d9e22ab9ae2c1f8957809f69d9b0">makeFeaturesRequestHeader</a>(</div>
<div class="line"><a id="l00210" name="l00210"></a><span class="lineno"> 210</span> <span class="keywordtype">bool</span> comprEnabled,</div>
<div class="line"><a id="l00211" name="l00211"></a><span class="lineno"> 211</span> <span class="keywordtype">bool</span> ledgerReplayEnabled,</div>
<div class="line"><a id="l00212" name="l00212"></a><span class="lineno"> 212</span> <span class="keywordtype">bool</span> txReduceRelayEnabled,</div>
<div class="line"><a id="l00213" name="l00213"></a><span class="lineno"> 213</span> <span class="keywordtype">bool</span> vpReduceRelayEnabled);</div>
<div class="line"><a id="l00214" name="l00214"></a><span class="lineno"> 214</span> </div>
<div class="line"><a id="l00228" name="l00228"></a><span class="lineno"> 228</span><a class="code hl_classRef" href="http://en.cppreference.com/w/cpp/string/basic_string.html">std::string</a></div>
<div class="line"><a id="l00229" name="l00229"></a><span class="lineno"> 229</span><a class="code hl_function" href="namespaceripple.html#a0a0ee63f1430dcca0ca6e0b06ca53998">makeFeaturesResponseHeader</a>(</div>
<div class="line"><a id="l00230" name="l00230"></a><span class="lineno"> 230</span> <a class="code hl_typedef" href="namespaceripple.html#aa265217edeb8282e636c78b50049f4c0">http_request_type</a> <span class="keyword">const</span>&amp; headers,</div>
<div class="line"><a id="l00231" name="l00231"></a><span class="lineno"> 231</span> <span class="keywordtype">bool</span> comprEnabled,</div>
<div class="line"><a id="l00232" name="l00232"></a><span class="lineno"> 232</span> <span class="keywordtype">bool</span> ledgerReplayEnabled,</div>
<div class="line"><a id="l00233" name="l00233"></a><span class="lineno"> 233</span> <span class="keywordtype">bool</span> txReduceRelayEnabled,</div>
<div class="line"><a id="l00234" name="l00234"></a><span class="lineno"> 234</span> <span class="keywordtype">bool</span> vpReduceRelayEnabled);</div>
<div class="line"><a id="l00235" name="l00235"></a><span class="lineno"> 235</span> </div>
<div class="line"><a id="l00236" name="l00236"></a><span class="lineno"> 236</span>} <span class="comment">// namespace ripple</span></div>
<div class="line"><a id="l00237" name="l00237"></a><span class="lineno"> 237</span> </div>
<div class="line"><a id="l00238" name="l00238"></a><span class="lineno"> 238</span><span class="preprocessor">#endif</span></div>
<div class="ttc" id="abasic_string_html"><div class="ttname"><a href="http://en.cppreference.com/w/cpp/string/basic_string.html">std::string</a></div></div>
<div class="ttc" id="aclassbeast_1_1Journal_html"><div class="ttname"><a href="classbeast_1_1Journal.html">beast::Journal</a></div><div class="ttdoc">A generic endpoint for log messages.</div><div class="ttdef"><b>Definition</b> <a href="Journal_8h_source.html#l00059">Journal.h:60</a></div></div>
<div class="ttc" id="aclassripple_1_1Application_html"><div class="ttname"><a href="classripple_1_1Application.html">ripple::Application</a></div><div class="ttdef"><b>Definition</b> <a href="Application_8h_source.html#l00113">Application.h:114</a></div></div>
<div class="ttc" id="aclassripple_1_1PublicKey_html"><div class="ttname"><a href="classripple_1_1PublicKey.html">ripple::PublicKey</a></div><div class="ttdoc">A public key.</div><div class="ttdef"><b>Definition</b> <a href="PublicKey_8h_source.html#l00061">PublicKey.h:62</a></div></div>
<div class="ttc" id="aclassbeast_1_1Journal_html"><div class="ttname"><a href="classbeast_1_1Journal.html">beast::Journal</a></div><div class="ttdoc">A generic endpoint for log messages.</div><div class="ttdef"><b>Definition</b> <a href="Journal_8h_source.html#l00040">Journal.h:41</a></div></div>
<div class="ttc" id="aclassripple_1_1Application_html"><div class="ttname"><a href="classripple_1_1Application.html">ripple::Application</a></div><div class="ttdef"><b>Definition</b> <a href="Application_8h_source.html#l00094">Application.h:95</a></div></div>
<div class="ttc" id="aclassripple_1_1PublicKey_html"><div class="ttname"><a href="classripple_1_1PublicKey.html">ripple::PublicKey</a></div><div class="ttdoc">A public key.</div><div class="ttdef"><b>Definition</b> <a href="PublicKey_8h_source.html#l00042">PublicKey.h:43</a></div></div>
<div class="ttc" id="aclassripple_1_1base__uint_html"><div class="ttname"><a href="classripple_1_1base__uint.html">ripple::base_uint&lt; 256 &gt;</a></div></div>
<div class="ttc" id="anamespacebeast_1_1IP_html_adbe597760cb20a7aa3f2ff92f7bed2cc"><div class="ttname"><a href="namespacebeast_1_1IP.html#adbe597760cb20a7aa3f2ff92f7bed2cc">beast::IP::Address</a></div><div class="ttdeci">boost::asio::ip::address Address</div><div class="ttdef"><b>Definition</b> <a href="IPAddress_8h_source.html#l00039">IPAddress.h:39</a></div></div>
<div class="ttc" id="anamespaceripple_html"><div class="ttname"><a href="namespaceripple.html">ripple</a></div><div class="ttdoc">Use hash_* containers for keys that do not need a cryptographically secure hashing algorithm.</div><div class="ttdef"><b>Definition</b> <a href="algorithm_8h_source.html#l00025">algorithm.h:25</a></div></div>
<div class="ttc" id="anamespaceripple_html_a0356489dd518b8dc89a1153048cb4aee"><div class="ttname"><a href="namespaceripple.html#a0356489dd518b8dc89a1153048cb4aee">ripple::stream_type</a></div><div class="ttdeci">boost::beast::ssl_stream&lt; socket_type &gt; stream_type</div><div class="ttdef"><b>Definition</b> <a href="Handshake_8h_source.html#l00042">Handshake.h:42</a></div></div>
<div class="ttc" id="anamespaceripple_html_a0a0ee63f1430dcca0ca6e0b06ca53998"><div class="ttname"><a href="namespaceripple.html#a0a0ee63f1430dcca0ca6e0b06ca53998">ripple::makeFeaturesResponseHeader</a></div><div class="ttdeci">std::string makeFeaturesResponseHeader(http_request_type const &amp;headers, bool comprEnabled, bool ledgerReplayEnabled, bool txReduceRelayEnabled, bool vpReduceRelayEnabled)</div><div class="ttdoc">Make response header X-Protocol-Ctl value with supported features.</div><div class="ttdef"><b>Definition</b> <a href="Handshake_8cpp_source.html#l00094">Handshake.cpp:94</a></div></div>
<div class="ttc" id="anamespaceripple_html_a201121472e8bff3b8d8eef7a2ef84b11"><div class="ttname"><a href="namespaceripple.html#a201121472e8bff3b8d8eef7a2ef84b11">ripple::DELIM_FEATURE</a></div><div class="ttdeci">static constexpr char DELIM_FEATURE[]</div><div class="ttdef"><b>Definition</b> <a href="Handshake_8h_source.html#l00148">Handshake.h:148</a></div></div>
<div class="ttc" id="anamespaceripple_html_a2581fa85c4291f16bf9e17d78615d584"><div class="ttname"><a href="namespaceripple.html#a2581fa85c4291f16bf9e17d78615d584">ripple::http_response_type</a></div><div class="ttdeci">boost::beast::http::response&lt; boost::beast::http::dynamic_body &gt; http_response_type</div><div class="ttdef"><b>Definition</b> <a href="Handoff_8h_source.html#l00035">Handoff.h:36</a></div></div>
<div class="ttc" id="anamespaceripple_html_a2f6f4c48edfa4bab7857fc6d554d0bcf"><div class="ttname"><a href="namespaceripple.html#a2f6f4c48edfa4bab7857fc6d554d0bcf">ripple::buildHandshake</a></div><div class="ttdeci">void buildHandshake(boost::beast::http::fields &amp;h, ripple::uint256 const &amp;sharedValue, std::optional&lt; std::uint32_t &gt; networkID, beast::IP::Address public_ip, beast::IP::Address remote_ip, Application &amp;app)</div><div class="ttdoc">Insert fields headers necessary for upgrading the link to the peer protocol.</div><div class="ttdef"><b>Definition</b> <a href="Handshake_8cpp_source.html#l00178">Handshake.cpp:178</a></div></div>
<div class="ttc" id="anamespaceripple_html_a329f20572687d73e31094b0717ea7424"><div class="ttname"><a href="namespaceripple.html#a329f20572687d73e31094b0717ea7424">ripple::FEATURE_COMPR</a></div><div class="ttdeci">static constexpr char FEATURE_COMPR[]</div><div class="ttdef"><b>Definition</b> <a href="Handshake_8h_source.html#l00141">Handshake.h:141</a></div></div>
<div class="ttc" id="anamespaceripple_html_a3626d08bac9baa6b3480e2e5ebe91682"><div class="ttname"><a href="namespaceripple.html#a3626d08bac9baa6b3480e2e5ebe91682">ripple::DELIM_VALUE</a></div><div class="ttdeci">static constexpr char DELIM_VALUE[]</div><div class="ttdef"><b>Definition</b> <a href="Handshake_8h_source.html#l00149">Handshake.h:149</a></div></div>
<div class="ttc" id="anamespaceripple_html_a3b64d9e22ab9ae2c1f8957809f69d9b0"><div class="ttname"><a href="namespaceripple.html#a3b64d9e22ab9ae2c1f8957809f69d9b0">ripple::makeFeaturesRequestHeader</a></div><div class="ttdeci">std::string makeFeaturesRequestHeader(bool comprEnabled, bool ledgerReplayEnabled, bool txReduceRelayEnabled, bool vpReduceRelayEnabled)</div><div class="ttdoc">Make request header X-Protocol-Ctl value with supported features.</div><div class="ttdef"><b>Definition</b> <a href="Handshake_8cpp_source.html#l00075">Handshake.cpp:75</a></div></div>
<div class="ttc" id="anamespaceripple_html_a5590ae6006b178275628bde91fa03129"><div class="ttname"><a href="namespaceripple.html#a5590ae6006b178275628bde91fa03129">ripple::makeResponse</a></div><div class="ttdeci">http_response_type makeResponse(bool crawlPublic, http_request_type const &amp;req, beast::IP::Address public_ip, beast::IP::Address remote_ip, uint256 const &amp;sharedValue, std::optional&lt; std::uint32_t &gt; networkID, ProtocolVersion protocol, Application &amp;app)</div><div class="ttdoc">Make http response.</div><div class="ttdef"><b>Definition</b> <a href="Handshake_8cpp_source.html#l00392">Handshake.cpp:392</a></div></div>
<div class="ttc" id="anamespaceripple_html_a59334776ad7699c39ec3683f1fca4b2e"><div class="ttname"><a href="namespaceripple.html#a59334776ad7699c39ec3683f1fca4b2e">ripple::FEATURE_LEDGER_REPLAY</a></div><div class="ttdeci">static constexpr char FEATURE_LEDGER_REPLAY[]</div><div class="ttdef"><b>Definition</b> <a href="Handshake_8h_source.html#l00147">Handshake.h:147</a></div></div>
<div class="ttc" id="anamespaceripple_html_a6d7b29582ed0ce64ee27f482ae5f96ba"><div class="ttname"><a href="namespaceripple.html#a6d7b29582ed0ce64ee27f482ae5f96ba">ripple::isFeatureValue</a></div><div class="ttdeci">bool isFeatureValue(boost::beast::http::fields const &amp;headers, std::string const &amp;feature, std::string const &amp;value)</div><div class="ttdoc">Check if a feature's value is equal to the specified value.</div><div class="ttdef"><b>Definition</b> <a href="Handshake_8cpp_source.html#l00055">Handshake.cpp:55</a></div></div>
<div class="ttc" id="anamespaceripple_html_a7241d07322a0d8fa2e2effedd739a90f"><div class="ttname"><a href="namespaceripple.html#a7241d07322a0d8fa2e2effedd739a90f">ripple::makeSharedValue</a></div><div class="ttdeci">std::optional&lt; uint256 &gt; makeSharedValue(stream_type &amp;ssl, beast::Journal journal)</div><div class="ttdoc">Computes a shared value based on the SSL connection state.</div><div class="ttdef"><b>Definition</b> <a href="Handshake_8cpp_source.html#l00146">Handshake.cpp:146</a></div></div>
<div class="ttc" id="anamespaceripple_html_aa265217edeb8282e636c78b50049f4c0"><div class="ttname"><a href="namespaceripple.html#aa265217edeb8282e636c78b50049f4c0">ripple::http_request_type</a></div><div class="ttdeci">boost::beast::http::request&lt; boost::beast::http::dynamic_body &gt; http_request_type</div><div class="ttdef"><b>Definition</b> <a href="Handoff_8h_source.html#l00032">Handoff.h:33</a></div></div>
<div class="ttc" id="anamespaceripple_html_aa479458839503ea9da8953313824886b"><div class="ttname"><a href="namespaceripple.html#aa479458839503ea9da8953313824886b">ripple::featureEnabled</a></div><div class="ttdeci">bool featureEnabled(boost::beast::http::fields const &amp;headers, std::string const &amp;feature)</div><div class="ttdoc">Check if a feature is enabled.</div><div class="ttdef"><b>Definition</b> <a href="Handshake_8cpp_source.html#l00067">Handshake.cpp:67</a></div></div>
<div class="ttc" id="anamespaceripple_html_ab289776c60bd705e640136f8248adff9"><div class="ttname"><a href="namespaceripple.html#ab289776c60bd705e640136f8248adff9">ripple::getFeatureValue</a></div><div class="ttdeci">std::optional&lt; std::string &gt; getFeatureValue(boost::beast::http::fields const &amp;headers, std::string const &amp;feature)</div><div class="ttdoc">Get feature's header value.</div><div class="ttdef"><b>Definition</b> <a href="Handshake_8cpp_source.html#l00039">Handshake.cpp:39</a></div></div>
<div class="ttc" id="anamespaceripple_html_ab58cf24607744c98d521c3e97aca2a53"><div class="ttname"><a href="namespaceripple.html#ab58cf24607744c98d521c3e97aca2a53">ripple::peerFeatureEnabled</a></div><div class="ttdeci">bool peerFeatureEnabled(headers const &amp;request, std::string const &amp;feature, std::string value, bool config)</div><div class="ttdoc">Check if a feature should be enabled for a peer.</div><div class="ttdef"><b>Definition</b> <a href="Handshake_8h_source.html#l00198">Handshake.h:198</a></div></div>
<div class="ttc" id="anamespaceripple_html_abfa1036f5269ce11a14cb8a8680dbc3e"><div class="ttname"><a href="namespaceripple.html#abfa1036f5269ce11a14cb8a8680dbc3e">ripple::FEATURE_TXRR</a></div><div class="ttdeci">static constexpr char FEATURE_TXRR[]</div><div class="ttdef"><b>Definition</b> <a href="Handshake_8h_source.html#l00145">Handshake.h:145</a></div></div>
<div class="ttc" id="anamespaceripple_html_ac35dc55d3f3c259f344225586a8887b4"><div class="ttname"><a href="namespaceripple.html#ac35dc55d3f3c259f344225586a8887b4">ripple::makeRequest</a></div><div class="ttdeci">auto makeRequest(bool crawlPublic, bool comprEnabled, bool ledgerReplayEnabled, bool txReduceRelayEnabled, bool vpReduceRelayEnabled) -&gt; request_type</div><div class="ttdoc">Make outbound http request.</div><div class="ttdef"><b>Definition</b> <a href="Handshake_8cpp_source.html#l00365">Handshake.cpp:365</a></div></div>
<div class="ttc" id="anamespaceripple_html_aca9c2c7a74ddd4a436b5984f6a265621"><div class="ttname"><a href="namespaceripple.html#aca9c2c7a74ddd4a436b5984f6a265621">ripple::request_type</a></div><div class="ttdeci">boost::beast::http::request&lt; boost::beast::http::empty_body &gt; request_type</div><div class="ttdef"><b>Definition</b> <a href="Handshake_8h_source.html#l00043">Handshake.h:44</a></div></div>
<div class="ttc" id="anamespaceripple_html_acd7881ae39681c7d64a5904b367219ab"><div class="ttname"><a href="namespaceripple.html#acd7881ae39681c7d64a5904b367219ab">ripple::verifyHandshake</a></div><div class="ttdeci">PublicKey verifyHandshake(boost::beast::http::fields const &amp;headers, ripple::uint256 const &amp;sharedValue, std::optional&lt; std::uint32_t &gt; networkID, beast::IP::Address public_ip, beast::IP::Address remote, Application &amp;app)</div><div class="ttdoc">Validate header fields necessary for upgrading the link to the peer protocol.</div><div class="ttdef"><b>Definition</b> <a href="Handshake_8cpp_source.html#l00227">Handshake.cpp:227</a></div></div>
<div class="ttc" id="anamespaceripple_html_acf6e0f2509512b9dac2b0daccafd75b9"><div class="ttname"><a href="namespaceripple.html#acf6e0f2509512b9dac2b0daccafd75b9">ripple::socket_type</a></div><div class="ttdeci">boost::beast::tcp_stream socket_type</div><div class="ttdef"><b>Definition</b> <a href="Handshake_8h_source.html#l00041">Handshake.h:41</a></div></div>
<div class="ttc" id="anamespaceripple_html_af8096ae8c38e0d57b54d62311a0ae0e3"><div class="ttname"><a href="namespaceripple.html#af8096ae8c38e0d57b54d62311a0ae0e3">ripple::FEATURE_VPRR</a></div><div class="ttdeci">static constexpr char FEATURE_VPRR[]</div><div class="ttdef"><b>Definition</b> <a href="Handshake_8h_source.html#l00143">Handshake.h:143</a></div></div>
<div class="ttc" id="anamespacebeast_1_1IP_html_adbe597760cb20a7aa3f2ff92f7bed2cc"><div class="ttname"><a href="namespacebeast_1_1IP.html#adbe597760cb20a7aa3f2ff92f7bed2cc">beast::IP::Address</a></div><div class="ttdeci">boost::asio::ip::address Address</div><div class="ttdef"><b>Definition</b> <a href="IPAddress_8h_source.html#l00020">IPAddress.h:20</a></div></div>
<div class="ttc" id="anamespaceripple_html"><div class="ttname"><a href="namespaceripple.html">ripple</a></div><div class="ttdoc">Use hash_* containers for keys that do not need a cryptographically secure hashing algorithm.</div><div class="ttdef"><b>Definition</b> <a href="algorithm_8h_source.html#l00006">algorithm.h:6</a></div></div>
<div class="ttc" id="anamespaceripple_html_a0356489dd518b8dc89a1153048cb4aee"><div class="ttname"><a href="namespaceripple.html#a0356489dd518b8dc89a1153048cb4aee">ripple::stream_type</a></div><div class="ttdeci">boost::beast::ssl_stream&lt; socket_type &gt; stream_type</div><div class="ttdef"><b>Definition</b> <a href="Handshake_8h_source.html#l00023">Handshake.h:23</a></div></div>
<div class="ttc" id="anamespaceripple_html_a0a0ee63f1430dcca0ca6e0b06ca53998"><div class="ttname"><a href="namespaceripple.html#a0a0ee63f1430dcca0ca6e0b06ca53998">ripple::makeFeaturesResponseHeader</a></div><div class="ttdeci">std::string makeFeaturesResponseHeader(http_request_type const &amp;headers, bool comprEnabled, bool ledgerReplayEnabled, bool txReduceRelayEnabled, bool vpReduceRelayEnabled)</div><div class="ttdoc">Make response header X-Protocol-Ctl value with supported features.</div><div class="ttdef"><b>Definition</b> <a href="Handshake_8cpp_source.html#l00075">Handshake.cpp:75</a></div></div>
<div class="ttc" id="anamespaceripple_html_a201121472e8bff3b8d8eef7a2ef84b11"><div class="ttname"><a href="namespaceripple.html#a201121472e8bff3b8d8eef7a2ef84b11">ripple::DELIM_FEATURE</a></div><div class="ttdeci">static constexpr char DELIM_FEATURE[]</div><div class="ttdef"><b>Definition</b> <a href="Handshake_8h_source.html#l00129">Handshake.h:129</a></div></div>
<div class="ttc" id="anamespaceripple_html_a2581fa85c4291f16bf9e17d78615d584"><div class="ttname"><a href="namespaceripple.html#a2581fa85c4291f16bf9e17d78615d584">ripple::http_response_type</a></div><div class="ttdeci">boost::beast::http::response&lt; boost::beast::http::dynamic_body &gt; http_response_type</div><div class="ttdef"><b>Definition</b> <a href="Handoff_8h_source.html#l00016">Handoff.h:17</a></div></div>
<div class="ttc" id="anamespaceripple_html_a2f6f4c48edfa4bab7857fc6d554d0bcf"><div class="ttname"><a href="namespaceripple.html#a2f6f4c48edfa4bab7857fc6d554d0bcf">ripple::buildHandshake</a></div><div class="ttdeci">void buildHandshake(boost::beast::http::fields &amp;h, ripple::uint256 const &amp;sharedValue, std::optional&lt; std::uint32_t &gt; networkID, beast::IP::Address public_ip, beast::IP::Address remote_ip, Application &amp;app)</div><div class="ttdoc">Insert fields headers necessary for upgrading the link to the peer protocol.</div><div class="ttdef"><b>Definition</b> <a href="Handshake_8cpp_source.html#l00159">Handshake.cpp:159</a></div></div>
<div class="ttc" id="anamespaceripple_html_a329f20572687d73e31094b0717ea7424"><div class="ttname"><a href="namespaceripple.html#a329f20572687d73e31094b0717ea7424">ripple::FEATURE_COMPR</a></div><div class="ttdeci">static constexpr char FEATURE_COMPR[]</div><div class="ttdef"><b>Definition</b> <a href="Handshake_8h_source.html#l00122">Handshake.h:122</a></div></div>
<div class="ttc" id="anamespaceripple_html_a3626d08bac9baa6b3480e2e5ebe91682"><div class="ttname"><a href="namespaceripple.html#a3626d08bac9baa6b3480e2e5ebe91682">ripple::DELIM_VALUE</a></div><div class="ttdeci">static constexpr char DELIM_VALUE[]</div><div class="ttdef"><b>Definition</b> <a href="Handshake_8h_source.html#l00130">Handshake.h:130</a></div></div>
<div class="ttc" id="anamespaceripple_html_a3b64d9e22ab9ae2c1f8957809f69d9b0"><div class="ttname"><a href="namespaceripple.html#a3b64d9e22ab9ae2c1f8957809f69d9b0">ripple::makeFeaturesRequestHeader</a></div><div class="ttdeci">std::string makeFeaturesRequestHeader(bool comprEnabled, bool ledgerReplayEnabled, bool txReduceRelayEnabled, bool vpReduceRelayEnabled)</div><div class="ttdoc">Make request header X-Protocol-Ctl value with supported features.</div><div class="ttdef"><b>Definition</b> <a href="Handshake_8cpp_source.html#l00056">Handshake.cpp:56</a></div></div>
<div class="ttc" id="anamespaceripple_html_a5590ae6006b178275628bde91fa03129"><div class="ttname"><a href="namespaceripple.html#a5590ae6006b178275628bde91fa03129">ripple::makeResponse</a></div><div class="ttdeci">http_response_type makeResponse(bool crawlPublic, http_request_type const &amp;req, beast::IP::Address public_ip, beast::IP::Address remote_ip, uint256 const &amp;sharedValue, std::optional&lt; std::uint32_t &gt; networkID, ProtocolVersion protocol, Application &amp;app)</div><div class="ttdoc">Make http response.</div><div class="ttdef"><b>Definition</b> <a href="Handshake_8cpp_source.html#l00373">Handshake.cpp:373</a></div></div>
<div class="ttc" id="anamespaceripple_html_a59334776ad7699c39ec3683f1fca4b2e"><div class="ttname"><a href="namespaceripple.html#a59334776ad7699c39ec3683f1fca4b2e">ripple::FEATURE_LEDGER_REPLAY</a></div><div class="ttdeci">static constexpr char FEATURE_LEDGER_REPLAY[]</div><div class="ttdef"><b>Definition</b> <a href="Handshake_8h_source.html#l00128">Handshake.h:128</a></div></div>
<div class="ttc" id="anamespaceripple_html_a6d7b29582ed0ce64ee27f482ae5f96ba"><div class="ttname"><a href="namespaceripple.html#a6d7b29582ed0ce64ee27f482ae5f96ba">ripple::isFeatureValue</a></div><div class="ttdeci">bool isFeatureValue(boost::beast::http::fields const &amp;headers, std::string const &amp;feature, std::string const &amp;value)</div><div class="ttdoc">Check if a feature's value is equal to the specified value.</div><div class="ttdef"><b>Definition</b> <a href="Handshake_8cpp_source.html#l00036">Handshake.cpp:36</a></div></div>
<div class="ttc" id="anamespaceripple_html_a7241d07322a0d8fa2e2effedd739a90f"><div class="ttname"><a href="namespaceripple.html#a7241d07322a0d8fa2e2effedd739a90f">ripple::makeSharedValue</a></div><div class="ttdeci">std::optional&lt; uint256 &gt; makeSharedValue(stream_type &amp;ssl, beast::Journal journal)</div><div class="ttdoc">Computes a shared value based on the SSL connection state.</div><div class="ttdef"><b>Definition</b> <a href="Handshake_8cpp_source.html#l00127">Handshake.cpp:127</a></div></div>
<div class="ttc" id="anamespaceripple_html_aa265217edeb8282e636c78b50049f4c0"><div class="ttname"><a href="namespaceripple.html#aa265217edeb8282e636c78b50049f4c0">ripple::http_request_type</a></div><div class="ttdeci">boost::beast::http::request&lt; boost::beast::http::dynamic_body &gt; http_request_type</div><div class="ttdef"><b>Definition</b> <a href="Handoff_8h_source.html#l00013">Handoff.h:14</a></div></div>
<div class="ttc" id="anamespaceripple_html_aa479458839503ea9da8953313824886b"><div class="ttname"><a href="namespaceripple.html#aa479458839503ea9da8953313824886b">ripple::featureEnabled</a></div><div class="ttdeci">bool featureEnabled(boost::beast::http::fields const &amp;headers, std::string const &amp;feature)</div><div class="ttdoc">Check if a feature is enabled.</div><div class="ttdef"><b>Definition</b> <a href="Handshake_8cpp_source.html#l00048">Handshake.cpp:48</a></div></div>
<div class="ttc" id="anamespaceripple_html_ab289776c60bd705e640136f8248adff9"><div class="ttname"><a href="namespaceripple.html#ab289776c60bd705e640136f8248adff9">ripple::getFeatureValue</a></div><div class="ttdeci">std::optional&lt; std::string &gt; getFeatureValue(boost::beast::http::fields const &amp;headers, std::string const &amp;feature)</div><div class="ttdoc">Get feature's header value.</div><div class="ttdef"><b>Definition</b> <a href="Handshake_8cpp_source.html#l00020">Handshake.cpp:20</a></div></div>
<div class="ttc" id="anamespaceripple_html_ab58cf24607744c98d521c3e97aca2a53"><div class="ttname"><a href="namespaceripple.html#ab58cf24607744c98d521c3e97aca2a53">ripple::peerFeatureEnabled</a></div><div class="ttdeci">bool peerFeatureEnabled(headers const &amp;request, std::string const &amp;feature, std::string value, bool config)</div><div class="ttdoc">Check if a feature should be enabled for a peer.</div><div class="ttdef"><b>Definition</b> <a href="Handshake_8h_source.html#l00179">Handshake.h:179</a></div></div>
<div class="ttc" id="anamespaceripple_html_abfa1036f5269ce11a14cb8a8680dbc3e"><div class="ttname"><a href="namespaceripple.html#abfa1036f5269ce11a14cb8a8680dbc3e">ripple::FEATURE_TXRR</a></div><div class="ttdeci">static constexpr char FEATURE_TXRR[]</div><div class="ttdef"><b>Definition</b> <a href="Handshake_8h_source.html#l00126">Handshake.h:126</a></div></div>
<div class="ttc" id="anamespaceripple_html_ac35dc55d3f3c259f344225586a8887b4"><div class="ttname"><a href="namespaceripple.html#ac35dc55d3f3c259f344225586a8887b4">ripple::makeRequest</a></div><div class="ttdeci">auto makeRequest(bool crawlPublic, bool comprEnabled, bool ledgerReplayEnabled, bool txReduceRelayEnabled, bool vpReduceRelayEnabled) -&gt; request_type</div><div class="ttdoc">Make outbound http request.</div><div class="ttdef"><b>Definition</b> <a href="Handshake_8cpp_source.html#l00346">Handshake.cpp:346</a></div></div>
<div class="ttc" id="anamespaceripple_html_aca9c2c7a74ddd4a436b5984f6a265621"><div class="ttname"><a href="namespaceripple.html#aca9c2c7a74ddd4a436b5984f6a265621">ripple::request_type</a></div><div class="ttdeci">boost::beast::http::request&lt; boost::beast::http::empty_body &gt; request_type</div><div class="ttdef"><b>Definition</b> <a href="Handshake_8h_source.html#l00024">Handshake.h:25</a></div></div>
<div class="ttc" id="anamespaceripple_html_acd7881ae39681c7d64a5904b367219ab"><div class="ttname"><a href="namespaceripple.html#acd7881ae39681c7d64a5904b367219ab">ripple::verifyHandshake</a></div><div class="ttdeci">PublicKey verifyHandshake(boost::beast::http::fields const &amp;headers, ripple::uint256 const &amp;sharedValue, std::optional&lt; std::uint32_t &gt; networkID, beast::IP::Address public_ip, beast::IP::Address remote, Application &amp;app)</div><div class="ttdoc">Validate header fields necessary for upgrading the link to the peer protocol.</div><div class="ttdef"><b>Definition</b> <a href="Handshake_8cpp_source.html#l00208">Handshake.cpp:208</a></div></div>
<div class="ttc" id="anamespaceripple_html_acf6e0f2509512b9dac2b0daccafd75b9"><div class="ttname"><a href="namespaceripple.html#acf6e0f2509512b9dac2b0daccafd75b9">ripple::socket_type</a></div><div class="ttdeci">boost::beast::tcp_stream socket_type</div><div class="ttdef"><b>Definition</b> <a href="Handshake_8h_source.html#l00022">Handshake.h:22</a></div></div>
<div class="ttc" id="anamespaceripple_html_af8096ae8c38e0d57b54d62311a0ae0e3"><div class="ttname"><a href="namespaceripple.html#af8096ae8c38e0d57b54d62311a0ae0e3">ripple::FEATURE_VPRR</a></div><div class="ttdeci">static constexpr char FEATURE_VPRR[]</div><div class="ttdef"><b>Definition</b> <a href="Handshake_8h_source.html#l00124">Handshake.h:124</a></div></div>
<div class="ttc" id="aoptional_html"><div class="ttname"><a href="http://en.cppreference.com/w/cpp/header/optional.html">optional</a></div></div>
<div class="ttc" id="apair_html"><div class="ttname"><a href="http://en.cppreference.com/w/cpp/utility/pair.html">std::pair</a></div></div>
<div class="ttc" id="autility_html"><div class="ttname"><a href="http://en.cppreference.com/w/cpp/header/utility.html">utility</a></div></div>