@ -429,7 +429,7 @@ terms of bandwidth, so it can be used just for a short exchange, and then recrea
also rotate encryption keys. The link can also be kept alive for longer periods of time, if this is
more suitable to the application. The procedure also inserts the *link id* , a hash calculated from the link request packet, into the memory of forwarding nodes, which means that the communicating nodes can thereafter reach each other simply by referring to this *link id*.
The combined bandwidth cost of setting up a link is 3 packets totalling 240 bytes (more info in the
The combined bandwidth cost of setting up a link is 3 packets totalling 237 bytes (more info in the
:ref:`Binary Packet Format<understanding-packetformat>` section). The amount of bandwidth used on keeping
a link open is practically negligible, at 0.62 bits per second. Even on a slow 1200 bits per second packet
radio channel, 100 concurrent links will still leave 95% channel capacity for actual data.
<spanclass="sig-name descname"><spanclass="pre">MTU</span></span><emclass="property"><spanclass="pre">=</span><spanclass="pre">500</span></em><aclass="headerlink"href="#RNS.Reticulum.MTU"title="Permalink to this definition">¶</a></dt>
<dd><p>The MTU that Reticulum adheres to, and will expect other peers to
adhere to. By default, the MTU is 500 bytes. In custom RNS network
implementations, it is possible to change this value, but doing so will
completely break compatibility with all other RNS networks. An identical
MTU is a prerequisite for peers to communicate in the same network.</p>
<p>Unless you really know what you are doing, the MTU should be left at
<emclass="property"><spanclass="pre">static</span></em><spanclass="sig-name descname"><spanclass="pre">should_allow_unencrypted</span></span><spanclass="sig-paren">(</span><spanclass="sig-paren">)</span><aclass="headerlink"href="#RNS.Reticulum.should_allow_unencrypted"title="Permalink to this definition">¶</a></dt>
@ -215,6 +227,21 @@ for addressable hashes and other purposes. Non-configurable.</p>
<emclass="property"><spanclass="pre">static</span></em><spanclass="sig-name descname"><spanclass="pre">from_bytes</span></span><spanclass="sig-paren">(</span><emclass="sig-param"><spanclass="n"><spanclass="pre">prv_bytes</span></span></em><spanclass="sig-paren">)</span><aclass="headerlink"href="#RNS.Identity.from_bytes"title="Permalink to this definition">¶</a></dt>
<dd><p>Create a new <aclass="reference internal"href="#api-identity"><spanclass="std std-ref">RNS.Identity</span></a> instance from <em>bytes</em> of private key.
Can be used to load previously created and saved identities into Reticulum.</p>
<dlclass="field-list simple">
<dtclass="field-odd">Parameters</dt>
<ddclass="field-odd"><p><strong>prv_bytes</strong>– The <em>bytes</em> of private a saved private key. <strong>HAZARD!</strong> Never use this to generate a new key by feeding random data in prv_bytes.</p>
</dd>
<dtclass="field-even">Returns</dt>
<ddclass="field-even"><p>A <aclass="reference internal"href="#api-identity"><spanclass="std std-ref">RNS.Identity</span></a> instance, or <em>None</em> if the <em>bytes</em> data was invalid.</p>
<emclass="property"><spanclass="pre">static</span></em><spanclass="sig-name descname"><spanclass="pre">from_file</span></span><spanclass="sig-paren">(</span><emclass="sig-param"><spanclass="n"><spanclass="pre">path</span></span></em><spanclass="sig-paren">)</span><aclass="headerlink"href="#RNS.Identity.from_file"title="Permalink to this definition">¶</a></dt>
@ -246,21 +273,6 @@ communication for the identity. Be very careful with this method.</p>
<emclass="property"><spanclass="pre">static</span></em><spanclass="sig-name descname"><spanclass="pre">from_bytes</span></span><spanclass="sig-paren">(</span><emclass="sig-param"><spanclass="n"><spanclass="pre">prv_bytes</span></span></em><spanclass="sig-paren">)</span><aclass="headerlink"href="#RNS.Identity.from_bytes"title="Permalink to this definition">¶</a></dt>
<dd><p>Create a new <aclass="reference internal"href="#api-identity"><spanclass="std std-ref">RNS.Identity</span></a> instance from <em>bytes</em> of private key.
Can be used to load previously created and saved identities into Reticulum.</p>
<dlclass="field-list simple">
<dtclass="field-odd">Parameters</dt>
<ddclass="field-odd"><p><strong>prv_bytes</strong>– The <em>bytes</em> of private a saved private key. <strong>HAZARD!</strong> Never not use this to generate a new key by feeding random data in prv_bytes.</p>
</dd>
<dtclass="field-even">Returns</dt>
<ddclass="field-even"><p>A <aclass="reference internal"href="#api-identity"><spanclass="std std-ref">RNS.Identity</span></a> instance, or <em>None</em> if the <em>bytes</em> data was invalid.</p>
<spanclass="sig-name descname"><spanclass="pre">get_private_key</span></span><spanclass="sig-paren">(</span><spanclass="sig-paren">)</span><aclass="headerlink"href="#RNS.Identity.get_private_key"title="Permalink to this definition">¶</a></dt>
@ -645,7 +657,7 @@ unless other app_data is specified in the <em>announce</em> method.</p>
<spanid="api-packet"></span><h3>Packet<aclass="headerlink"href="#packet"title="Permalink to this headline">¶</a></h3>
<dlclass="py class">
<dtclass="sig sig-object py"id="RNS.Packet">
<emclass="property"><spanclass="pre">class</span></em><spanclass="sig-prename descclassname"><spanclass="pre">RNS.</span></span><spanclass="sig-name descname"><spanclass="pre">Packet</span></span><spanclass="sig-paren">(</span><emclass="sig-param"><spanclass="n"><spanclass="pre">destination</span></span></em>, <emclass="sig-param"><spanclass="n"><spanclass="pre">data</span></span></em>, <emclass="sig-param"><spanclass="n"><spanclass="pre">packet_type</span></span><spanclass="o"><spanclass="pre">=</span></span><spanclass="default_value"><spanclass="pre">0</span></span></em>, <emclass="sig-param"><spanclass="n"><spanclass="pre">context</span></span><spanclass="o"><spanclass="pre">=</span></span><spanclass="default_value"><spanclass="pre">0</span></span></em>, <emclass="sig-param"><spanclass="n"><spanclass="pre">transport_type</span></span><spanclass="o"><spanclass="pre">=</span></span><spanclass="default_value"><spanclass="pre">0</span></span></em>, <emclass="sig-param"><spanclass="n"><spanclass="pre">header_type</span></span><spanclass="o"><spanclass="pre">=</span></span><spanclass="default_value"><spanclass="pre">0</span></span></em>, <emclass="sig-param"><spanclass="n"><spanclass="pre">transport_id</span></span><spanclass="o"><spanclass="pre">=</span></span><spanclass="default_value"><spanclass="pre">None</span></span></em>, <emclass="sig-param"><spanclass="n"><spanclass="pre">attached_interface</span></span><spanclass="o"><spanclass="pre">=</span></span><spanclass="default_value"><spanclass="pre">None</span></span></em>, <emclass="sig-param"><spanclass="n"><spanclass="pre">create_receipt</span></span><spanclass="o"><spanclass="pre">=</span></span><spanclass="default_value"><spanclass="pre">True</span></span></em><spanclass="sig-paren">)</span><aclass="headerlink"href="#RNS.Packet"title="Permalink to this definition">¶</a></dt>
<emclass="property"><spanclass="pre">class</span></em><spanclass="sig-prename descclassname"><spanclass="pre">RNS.</span></span><spanclass="sig-name descname"><spanclass="pre">Packet</span></span><spanclass="sig-paren">(</span><emclass="sig-param"><spanclass="n"><spanclass="pre">destination</span></span></em>, <emclass="sig-param"><spanclass="n"><spanclass="pre">data</span></span></em>, <emclass="sig-param"><spanclass="n"><spanclass="pre">create_receipt</span></span><spanclass="o"><spanclass="pre">=</span></span><spanclass="default_value"><spanclass="pre">True</span></span></em><spanclass="sig-paren">)</span><aclass="headerlink"href="#RNS.Packet"title="Permalink to this definition">¶</a></dt>
<dd><p>The Packet class is used to create packet instances that can be sent
over a Reticulum network. Packets to will automatically be encrypted if
they are adressed to a <codeclass="docutils literal notranslate"><spanclass="pre">RNS.Destination.SINGLE</span></code> destination,
@ -660,11 +672,6 @@ destinations, reticulum will use ephemeral keys, and offers <strong>Forward Secr
<li><p><strong>destination</strong>– A <aclass="reference internal"href="#api-destination"><spanclass="std std-ref">RNS.Destination</span></a> instance to which the packet will be sent.</p></li>
<li><p><strong>data</strong>– The data payload to be included in the packet as <em>bytes</em>.</p></li>
<li><p><strong>create_receipt</strong>– Specifies whether a <aclass="reference internal"href="#api-packetreceipt"><spanclass="std std-ref">RNS.PacketReceipt</span></a> should be created when instantiating the packet.</p></li>
<li><p><strong>type</strong>– Internal use by <aclass="reference internal"href="#api-transport"><spanclass="std std-ref">RNS.Transport</span></a>. Defaults to <codeclass="docutils literal notranslate"><spanclass="pre">RNS.Packet.DATA</span></code>, and should not be specified.</p></li>
<li><p><strong>context</strong>– Internal use by <aclass="reference internal"href="#api-transport"><spanclass="std std-ref">RNS.Transport</span></a>. Ignore.</p></li>
<li><p><strong>transport_type</strong>– Internal use by <aclass="reference internal"href="#api-transport"><spanclass="std std-ref">RNS.Transport</span></a>. Ignore.</p></li>
<li><p><strong>transport_id</strong>– Internal use by <aclass="reference internal"href="#api-transport"><spanclass="std std-ref">RNS.Transport</span></a>. Ignore.</p></li>
<li><p><strong>attached_interface</strong>– Internal use by <aclass="reference internal"href="#api-transport"><spanclass="std std-ref">RNS.Transport</span></a>. Ignore.</p></li>
</ul>
</dd>
</dl>
@ -709,11 +716,11 @@ destinations, reticulum will use ephemeral keys, and offers <strong>Forward Secr
<spanid="api-packetreceipt"></span><h3>Packet Receipt<aclass="headerlink"href="#packet-receipt"title="Permalink to this headline">¶</a></h3>
<emclass="property"><spanclass="pre">class</span></em><spanclass="sig-prename descclassname"><spanclass="pre">RNS.</span></span><spanclass="sig-name descname"><spanclass="pre">PacketReceipt</span></span><span class="sig-paren">(</span><emclass="sig-param"><spanclass="n"><spanclass="pre">packet</span></span></em><spanclass="sig-paren">)</span><a class="headerlink"href="#RNS.PacketReceipt"title="Permalink to this definition">¶</a></dt>
<emclass="property"><spanclass="pre">class</span></em><spanclass="sig-prename descclassname"><spanclass="pre">RNS.</span></span><spanclass="sig-name descname"><spanclass="pre">PacketReceipt</span></span><a class="headerlink"href="#RNS.PacketReceipt"title="Permalink to this definition">¶</a></dt>
<dd><p>The PacketReceipt class is used to receive notifications about
<aclass="reference internal"href="#api-packet"><spanclass="std std-ref">RNS.Packet</span></a> instances sent over the network. Instances
of this class should never be created manually, but always returned
from a the <em>send()</em> method of a <aclass="reference internal"href="#api-packet"><spanclass="std std-ref">RNS.Packet</span></a> instance.</p>
of this class are never created manually, but always returned from
the <em>send()</em> method of a <aclass="reference internal"href="#api-packet"><spanclass="std std-ref">RNS.Packet</span></a> instance.</p>
<spanclass="sig-name descname"><spanclass="pre">get_status</span></span><spanclass="sig-paren">(</span><spanclass="sig-paren">)</span><aclass="headerlink"href="#RNS.PacketReceipt.get_status"title="Permalink to this definition">¶</a></dt>
@ -774,17 +781,16 @@ from a the <em>send()</em> method of a <a class="reference internal" href="#api-
<spanid="api-link"></span><h3>Link<aclass="headerlink"href="#link"title="Permalink to this headline">¶</a></h3>
<dlclass="py class">
<dtclass="sig sig-object py"id="RNS.Link">
<emclass="property"><spanclass="pre">class</span></em><spanclass="sig-prename descclassname"><spanclass="pre">RNS.</span></span><spanclass="sig-name descname"><spanclass="pre">Link</span></span><spanclass="sig-paren">(</span><emclass="sig-param"><spanclass="n"><spanclass="pre">destination</span></span><spanclass="o"><spanclass="pre">=</span></span><spanclass="default_value"><spanclass="pre">None</span></span></em>, <emclass="sig-param"><spanclass="n"><spanclass="pre">established_callback</span></span><spanclass="o"><spanclass="pre">=</span></span><spanclass="default_value"><spanclass="pre">None</span></span></em>, <emclass="sig-param"><spanclass="n"><spanclass="pre">closed_callback</span></span><spanclass="o"><spanclass="pre">=</span></span><spanclass="default_value"><spanclass="pre">None</span></span></em>, <emclass="sig-param"><spanclass="n"><spanclass="pre">owner</span></span><spanclass="o"><spanclass="pre">=</span></span><spanclass="default_value"><spanclass="pre">None</span></span></em>, <emclass="sig-param"><spanclass="n"><spanclass="pre">peer_pub_bytes</span></span><spanclass="o"><spanclass="pre">=</span></span><spanclass="default_value"><spanclass="pre">None</span></span></em>, <emclass="sig-param"><spanclass="n"><spanclass="pre">peer_sig_pub_bytes</span></span><spanclass="o"><spanclass="pre">=</span></span><spanclass="default_value"><spanclass="pre">None</span></span></em><spanclass="sig-paren">)</span><aclass="headerlink"href="#RNS.Link"title="Permalink to this definition">¶</a></dt>
<dd><p>This class.</p>
<emclass="property"><spanclass="pre">class</span></em><spanclass="sig-prename descclassname"><spanclass="pre">RNS.</span></span><spanclass="sig-name descname"><spanclass="pre">Link</span></span><spanclass="sig-paren">(</span><emclass="sig-param"><spanclass="n"><spanclass="pre">destination</span></span></em>, <emclass="sig-param"><spanclass="n"><spanclass="pre">established_callback</span></span><spanclass="o"><spanclass="pre">=</span></span><spanclass="default_value"><spanclass="pre">None</span></span></em>, <emclass="sig-param"><spanclass="n"><spanclass="pre">closed_callback</span></span><spanclass="o"><spanclass="pre">=</span></span><spanclass="default_value"><spanclass="pre">None</span></span></em><spanclass="sig-paren">)</span><aclass="headerlink"href="#RNS.Link"title="Permalink to this definition">¶</a></dt>
<dd><p>This class is used to establish and manage links to other peers. When a
link instance is created, Reticulum will attempt to establish verified
connectivity with the specified destination.</p>
<dlclass="field-list simple">
<dtclass="field-odd">Parameters</dt>
<ddclass="field-odd"><ulclass="simple">
<li><p><strong>destination</strong>– A <aclass="reference internal"href="#api-destination"><spanclass="std std-ref">RNS.Destination</span></a> instance which to establish a link to.</p></li>
<li><p><strong>established_callback</strong>– A function or method with the signature <em>callback(link)</em> to be called when the link has been established.</p></li>
<li><p><strong>closed_callback</strong>– A function or method with the signature <em>callback(link)</em> to be called when the link is closed.</p></li>
<li><p><strong>owner</strong>– Internal use by <aclass="reference internal"href="#api-transport"><spanclass="std std-ref">RNS.Transport</span></a>, ignore this argument.</p></li>
<li><p><strong>peer_pub_bytes</strong>– Internal use, ignore this argument.</p></li>
<li><p><strong>peer_sig_pub_bytes</strong>– Internal use, ignore this argument.</p></li>
<li><p><strong>established_callback</strong>– An optional function or method with the signature <em>callback(link)</em> to be called when the link has been established.</p></li>
<li><p><strong>closed_callback</strong>– An optional function or method with the signature <em>callback(link)</em> to be called when the link is closed.</p></li>
</ul>
</dd>
</dl>
@ -834,6 +840,9 @@ thus preserved. This method can be used for authentication.</p>
<li><p><strong>timeout</strong>– An optional timeout in seconds for the request. If <em>None</em> is supplied it will be calculated based on link RTT.</p></li>
</ul>
</dd>
<dtclass="field-even">Returns</dt>
<ddclass="field-even"><p>A <aclass="reference internal"href="#api-requestreceipt"><spanclass="std std-ref">RNS.RequestReceipt</span></a> instance if the request was sent, or <em>False</em> if it was not.</p>
</dd>
</dl>
</dd></dl>
@ -974,12 +983,73 @@ client application and throw an error message to the user.</p>
</dd></dl>
</div>
<divclass="section"id="request-receipt">
<spanid="api-requestreceipt"></span><h3>Request Receipt<aclass="headerlink"href="#request-receipt"title="Permalink to this headline">¶</a></h3>
<emclass="property"><spanclass="pre">class</span></em><spanclass="sig-prename descclassname"><spanclass="pre">RNS.</span></span><spanclass="sig-name descname"><spanclass="pre">RequestReceipt</span></span><aclass="headerlink"href="#RNS.RequestReceipt"title="Permalink to this definition">¶</a></dt>
<dd><p>An instance of this class is returned by the <codeclass="docutils literal notranslate"><spanclass="pre">request</span></code> method of <codeclass="docutils literal notranslate"><spanclass="pre">RNS.Link</span></code>
instances. It should never be instantiated manually. It provides methods to
check status, response time and response data when the request concludes.</p>
<spanclass="sig-name descname"><spanclass="pre">get_request_id</span></span><spanclass="sig-paren">(</span><spanclass="sig-paren">)</span><aclass="headerlink"href="#RNS.RequestReceipt.get_request_id"title="Permalink to this definition">¶</a></dt>
<dd><dlclass="field-list simple">
<dtclass="field-odd">Returns</dt>
<ddclass="field-odd"><p>The request ID as <em>bytes</em>.</p>
<spanclass="sig-name descname"><spanclass="pre">get_status</span></span><spanclass="sig-paren">(</span><spanclass="sig-paren">)</span><aclass="headerlink"href="#RNS.RequestReceipt.get_status"title="Permalink to this definition">¶</a></dt>
<dd><dlclass="field-list simple">
<dtclass="field-odd">Returns</dt>
<ddclass="field-odd"><p>The current status of the request, one of <codeclass="docutils literal notranslate"><spanclass="pre">RNS.RequestReceipt.FAILED</span></code>, <codeclass="docutils literal notranslate"><spanclass="pre">RNS.RequestReceipt.SENT</span></code>, <codeclass="docutils literal notranslate"><spanclass="pre">RNS.RequestReceipt.DELIVERED</span></code>, <codeclass="docutils literal notranslate"><spanclass="pre">RNS.RequestReceipt.READY</span></code>.</p>
<spanclass="sig-name descname"><spanclass="pre">get_progress</span></span><spanclass="sig-paren">(</span><spanclass="sig-paren">)</span><aclass="headerlink"href="#RNS.RequestReceipt.get_progress"title="Permalink to this definition">¶</a></dt>
<dd><dlclass="field-list simple">
<dtclass="field-odd">Returns</dt>
<ddclass="field-odd"><p>The progress of a response being received as a <em>float</em> between 0.0 and 1.0.</p>
<spanclass="sig-name descname"><spanclass="pre">get_response</span></span><spanclass="sig-paren">(</span><spanclass="sig-paren">)</span><aclass="headerlink"href="#RNS.RequestReceipt.get_response"title="Permalink to this definition">¶</a></dt>
<dd><dlclass="field-list simple">
<dtclass="field-odd">Returns</dt>
<ddclass="field-odd"><p>The response as <em>bytes</em> if it is ready, otherwise <em>None</em>.</p>
<spanclass="sig-name descname"><spanclass="pre">get_response_time</span></span><spanclass="sig-paren">(</span><spanclass="sig-paren">)</span><aclass="headerlink"href="#RNS.RequestReceipt.get_response_time"title="Permalink to this definition">¶</a></dt>
<dd><dlclass="field-list simple">
<dtclass="field-odd">Returns</dt>
<ddclass="field-odd"><p>The response time of the request in seconds.</p>
</dd>
</dl>
</dd></dl>
</dd></dl>
</div>
<divclass="section"id="resource">
<spanid="api-resource"></span><h3>Resource<aclass="headerlink"href="#resource"title="Permalink to this headline">¶</a></h3>
<dlclass="py class">
<dtclass="sig sig-object py"id="RNS.Resource">
<emclass="property"><spanclass="pre">class</span></em><spanclass="sig-prename descclassname"><spanclass="pre">RNS.</span></span><spanclass="sig-name descname"><spanclass="pre">Resource</span></span><spanclass="sig-paren">(</span><emclass="sig-param"><spanclass="n"><spanclass="pre">data</span></span></em>, <emclass="sig-param"><spanclass="n"><spanclass="pre">link</span></span></em>, <emclass="sig-param"><spanclass="n"><spanclass="pre">advertise</span></span><spanclass="o"><spanclass="pre">=</span></span><spanclass="default_value"><spanclass="pre">True</span></span></em>, <emclass="sig-param"><spanclass="n"><spanclass="pre">auto_compress</span></span><spanclass="o"><spanclass="pre">=</span></span><spanclass="default_value"><spanclass="pre">True</span></span></em>, <emclass="sig-param"><spanclass="n"><spanclass="pre">callback</span></span><spanclass="o"><spanclass="pre">=</span></span><spanclass="default_value"><spanclass="pre">None</span></span></em>, <emclass="sig-param"><spanclass="n"><spanclass="pre">progress_callback</span></span><spanclass="o"><spanclass="pre">=</span></span><spanclass="default_value"><spanclass="pre">None</span></span></em>, <emclass="sig-param"><spanclass="n"><spanclass="pre">timeout</span></span><spanclass="o"><spanclass="pre">=</span></span><spanclass="default_value"><spanclass="pre">None</span></span></em>, <emclass="sig-param"><spanclass="n"><spanclass="pre">segment_index</span></span><spanclass="o"><spanclass="pre">=</span></span><spanclass="default_value"><spanclass="pre">1</span></span></em>, <emclass="sig-param"><spanclass="n"><spanclass="pre">original_hash</span></span><spanclass="o"><spanclass="pre">=</span></span><spanclass="default_value"><spanclass="pre">None</span></span></em>, <emclass="sig-param"><spanclass="n"><spanclass="pre">request_id</span></span><spanclass="o"><spanclass="pre">=</span></span><spanclass="default_value"><spanclass="pre">None</span></span></em>, <emclass="sig-param"><spanclass="n"><spanclass="pre">is_response</span></span><spanclass="o"><spanclass="pre">=</span></span><spanclass="default_value"><spanclass="pre">False</span></span></em><spanclass="sig-paren">)</span><aclass="headerlink"href="#RNS.Resource"title="Permalink to this definition">¶</a></dt>
<emclass="property"><spanclass="pre">class</span></em><spanclass="sig-prename descclassname"><spanclass="pre">RNS.</span></span><spanclass="sig-name descname"><spanclass="pre">Resource</span></span><spanclass="sig-paren">(</span><emclass="sig-param"><spanclass="n"><spanclass="pre">data</span></span></em>, <emclass="sig-param"><spanclass="n"><spanclass="pre">link</span></span></em>, <emclass="sig-param"><spanclass="n"><spanclass="pre">advertise</span></span><spanclass="o"><spanclass="pre">=</span></span><spanclass="default_value"><spanclass="pre">True</span></span></em>, <emclass="sig-param"><spanclass="n"><spanclass="pre">auto_compress</span></span><spanclass="o"><spanclass="pre">=</span></span><spanclass="default_value"><spanclass="pre">True</span></span></em>, <emclass="sig-param"><spanclass="n"><spanclass="pre">callback</span></span><spanclass="o"><spanclass="pre">=</span></span><spanclass="default_value"><spanclass="pre">None</span></span></em>, <emclass="sig-param"><spanclass="n"><spanclass="pre">progress_callback</span></span><spanclass="o"><spanclass="pre">=</span></span><spanclass="default_value"><spanclass="pre">None</span></span></em>, <emclass="sig-param"><spanclass="n"><spanclass="pre">timeout</span></span><spanclass="o"><spanclass="pre">=</span></span><spanclass="default_value"><spanclass="pre">None</span></span></em><spanclass="sig-paren">)</span><aclass="headerlink"href="#RNS.Resource"title="Permalink to this definition">¶</a></dt>
<dd><p>The Resource class allows transferring arbitrary amounts
of data over a link. It will automatically handle sequencing,
compression, coordination and checksumming.</p>
@ -988,14 +1058,10 @@ compression, coordination and checksumming.</p>
<ddclass="field-odd"><ulclass="simple">
<li><p><strong>data</strong>– The data to be transferred. Can be <em>bytes</em> or an open <em>file handle</em>. See the <aclass="reference internal"href="examples.html#example-filetransfer"><spanclass="std std-ref">Filetransfer Example</span></a> for details.</p></li>
<li><p><strong>link</strong>– The <aclass="reference internal"href="#api-link"><spanclass="std std-ref">RNS.Link</span></a> instance on which to transfer the data.</p></li>
<li><p><strong>advertise</strong>– Whether to automatically advertise the resource. Can be <em>True</em> or <em>False</em>.</p></li>
<li><p><strong>auto_compress</strong>– Whether to auto-compress the resource. Can be <em>True</em> or <em>False</em>.</p></li>
<li><p><strong>callback</strong>– A <em>callable</em> with the signature <em>callback(resource)</em>. Will be called when the resource transfer concludes.</p></li>
<li><p><strong>progress_callback</strong>– A <em>callable</em> with the signature <em>callback(resource)</em>. Will be called whenever the resource transfer progress is updated.</p></li>
<li><p><strong>advertise</strong>– Optional. Whether to automatically advertise the resource. Can be <em>True</em> or <em>False</em>.</p></li>
<li><p><strong>auto_compress</strong>– Optional. Whether to auto-compress the resource. Can be <em>True</em> or <em>False</em>.</p></li>
<li><p><strong>callback</strong>– An optional <em>callable</em> with the signature <em>callback(resource)</em>. Will be called when the resource transfer concludes.</p></li>
<li><p><strong>progress_callback</strong>– An optional <em>callable</em> with the signature <em>callback(resource)</em>. Will be called whenever the resource transfer progress is updated.</p></li>
</ul>
</dd>
</dl>
@ -1013,8 +1079,8 @@ the resource advertisement it will begin transferring.</p>
<spanclass="sig-name descname"><spanclass="pre">progress</span></span><spanclass="sig-paren">(</span><spanclass="sig-paren">)</span><aclass="headerlink"href="#RNS.Resource.progress" title="Permalink to this definition">¶</a></dt>
<spanclass="sig-name descname"><spanclass="pre">get_progress</span></span><spanclass="sig-paren">(</span><spanclass="sig-paren">)</span><aclass="headerlink"href="#RNS.Resource.get_progress" title="Permalink to this definition">¶</a></dt>
<dd><dlclass="field-list simple">
<dtclass="field-odd">Returns</dt>
<ddclass="field-odd"><p>The current progress of the resource transfer as a <em>float</em> between 0.0 and 1.0.</p>
@ -1030,7 +1096,9 @@ the resource advertisement it will begin transferring.</p>
<dlclass="py class">
<dtclass="sig sig-object py"id="RNS.Transport">
<emclass="property"><spanclass="pre">class</span></em><spanclass="sig-prename descclassname"><spanclass="pre">RNS.</span></span><spanclass="sig-name descname"><spanclass="pre">Transport</span></span><aclass="headerlink"href="#RNS.Transport"title="Permalink to this definition">¶</a></dt>
<dd><dlclass="py attribute">
<dd><p>Through static methods of this class you can interact with Reticulums
<spanclass="sig-name descname"><spanclass="pre">PATHFINDER_M</span></span><emclass="property"><spanclass="pre">=</span><spanclass="pre">128</span></em><aclass="headerlink"href="#RNS.Transport.PATHFINDER_M"title="Permalink to this definition">¶</a></dt>
<dd><p>Maximum amount of hops that Reticulum will transport a packet.</p>
@ -490,7 +490,7 @@ At the same time we establish an efficient encrypted channel. The setup of this
terms of bandwidth, so it can be used just for a short exchange, and then recreated as needed, which will
also rotate encryption keys. The link can also be kept alive for longer periods of time, if this is
more suitable to the application. The procedure also inserts the <em>link id</em> , a hash calculated from the link request packet, into the memory of forwarding nodes, which means that the communicating nodes can thereafter reach each other simply by referring to this <em>link id</em>.</p>
<p>The combined bandwidth cost of setting up a link is 3 packets totalling 240 bytes (more info in the
<p>The combined bandwidth cost of setting up a link is 3 packets totalling 237 bytes (more info in the
<aclass="reference internal"href="#understanding-packetformat"><spanclass="std std-ref">Binary Packet Format</span></a> section). The amount of bandwidth used on keeping
a link open is practically negligible, at 0.62 bits per second. Even on a slow 1200 bits per second packet
radio channel, 100 concurrent links will still leave 95% channel capacity for actual data.</p>
@ -764,7 +764,7 @@ proof 11
- Announce : 151 bytes
- Link Request : 77 bytes
- Link Proof : 77 bytes
- Link RTT packet : 86 bytes
- Link RTT packet : 83 bytes
- Link keepalive : 14 bytes
</pre></div>
</div>
@ -853,7 +853,7 @@ proof 11
<liclass="right">
<ahref="gettingstartedfast.html"title="Getting Started Fast"