This is a read-only snapshot of the ComputerCraft forums, taken in April 2020.
SpencerBeige's profile picture

Sending a lot of things through rednet. Please help.

Started by SpencerBeige, 03 October 2015 - 02:15 AM
SpencerBeige #1
Posted 03 October 2015 - 04:15 AM
The goal is to send an entire directory through rednet. I wont say whats in the directory, because the goal is that it will 'scan' each level and send all of it through rednet. i don't just need file names, i also need it to send a file's code. If any one has the slightest clue as to how to do this, please help.
Luca_S #2
Posted 03 October 2015 - 05:28 AM
I will change my pack api so it can do what you need, you can take a look at how it does that then.
Luca_S #3
Posted 03 October 2015 - 05:45 AM
http://pastebin.com/yaurEs1W

Take a look at that. Then you will know how to do it.

Tip: rednet can transmit tables
TYKUHN2 #4
Posted 03 October 2015 - 06:17 AM
Not sure what the limit on rednet is but real life FTP packets have limits too. Truncate the rednet packet and send continuation packets. Preferably with a method of telling which order to go in just in case.
Bomb Bloke #5
Posted 03 October 2015 - 08:26 AM
Not sure what the limit on rednet is but real life FTP packets have limits too.

The only limits to rednet that come to mind are that it falls prey to the UTF bugs, potentially mangling strings containing non-ASCII characters (… which is where base64 comes in), and that you're unable to send function/coroutine pointers. You can also run into trouble if you try to send more than one message to a target per yield you perform - this will eventually lead to the target's event queue flooding (at which point it'll start "missing" events).

But those factors probably aren't relevant here. In terms of message size, you can go to town; there's nothing stopping you from collating the entire contents of a system's drive and sending it as one single message.
TYKUHN2 #6
Posted 03 October 2015 - 04:18 PM
I have checked and there is no message size limit, so I am not entirely sure what the issue is.