mirror of
https://github.com/markqvist/Reticulum.git
synced 2025-05-02 06:36:14 -04:00
File transfer example
This commit is contained in:
parent
4d48a50f7e
commit
8aa2f8613a
3 changed files with 13 additions and 5 deletions
|
@ -86,8 +86,10 @@ def client_connected(link):
|
|||
# We pack a list of files for sending in a packet
|
||||
data = umsgpack.packb(list_files())
|
||||
|
||||
RNS.log(str(len(data)))
|
||||
|
||||
# Check the size of the packed data
|
||||
if len(data) <= RNS.Resource.SDU:
|
||||
if len(data) <= RNS.Reticulum.LINK_MDU:
|
||||
# If it fits in one packet, we will just
|
||||
# send it as a single packet over the link.
|
||||
list_packet = RNS.Packet(link, data)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue