Want to have modemless interdimensional communication, but Skynet is too slow? (it's not that slow)
Are you on a version of ComputerCraft that doesn't support websockets? (update, you luddite)
Or are you that guy?
Then Might I IntroDuce To You
DISKNET
The Only Network API That You Can Download By Executing The Command:
wget https://github.com/LDDestroier/CC/raw/master/disknet.lua
Disknet works by using a shared directory between two or more computers to emulate the functionality of a modem.
You open a "channel" file, then can send/receive messages to/from it.
While one machine is receiving, it is constantly checking the channel file for changes. If it finds one, it will re-read it and see if a new message was sent.
This reads one or more files every tick, so using several channels might slow it down a tad.
This might not seem useful, but if you have two duplicated floppy disks with the same ID, you can use this for private inter-dimensional communications!
Without that, you can also essentially double the maximum possible length of wired cables from 256 to 512 by sticking a disk drive w/ a disk at the halfway point. That's useful, probably.
I've always wanted to make something like this since 2014, but never knew how until now!
Here's the list of functions and their uses:
Spoiler
Set the path that Disknet uses. It should really be on a disk, though.
disknet.mainPath = "disk/DISKNET" -- this is the default
Open a channel for use. You can NOT use unopened channels.
success = disknet.open(channel) -- Can be any number or string
Closes a channel. / Closes all channels.
success = disknet.close(channel) -- closes ONE channel
success = disknet.closeAll() -- closes EVERY channel
Checks if a channel is opened.
isOpen = disknet.isOpen(channel)
Sends a message. Can't send functions or any other datatypes that cannot be serialized. Can optionally specify a recipient by computer ID.
success = disknet.send(channel, message, [recipient ID])
Receives a message. Can optionally filter with channel (assuming said channel is open) or by the sender's ID.
message, channel, senderID, timeThatMessageWasSentAt = disknet.receive(channelFilter, [sender ID])
Tell me what you think in the comments, or I'll eat your shoes