There are no open or close methods because that's all handled automatically. The modem is dynamically detected, so the first call to send() will take longer than the others, etc.
rdtp.send(target, code, format, data, label, srcid)
Sends a table to the target:
msg = { code = "code", format = "format", data = "data", label = "label", srcid = srcid }
code: A hex string from '00' to 'ff' indicating the meaning of the message.
format: A string declaring the type of content in 'data'. This allows us to support picture, video, and other formats.
data: A string containing the message itself.
label: A string containing the label of the sender. Clients can send nil instead, but servers must send their label.
srcid: The ID of the origin computer. This allows us to use rednet repeaters without really needing to try too hard.
Returns a table received from the target. This method will wait up to ten seconds for a response from the target before giving up.
rdtp.receive(t)
Waits for any rednet message. Usually for servers only.
If it times out, it will likely lead to a 10 error.
Returns a table.
rdtp.replyTo(targetID, code, format, data, label, srcid)
Sends a table to the target:
msg = { code = "code", format = "format", data = "data", label = "label", srcid = srcid }
code: A hex string from '00' to 'ff' indicating the meaning of the message.
format: A string declaring the type of content in 'data'. This allows us to support picture, video, and other formats.
data: A string containing the message itself.
label: A string containing the label of the sender. Clients can send nil instead, but servers must send their label.
srcid: The ID of the origin computer. This allows us to use rednet repeaters without really needing to try too hard.
Doesn't return anything.
rdtps.send(target, code, format, data, label, srcid, algorithm, pubkey, hash, hashtype)
Sends a table to the target:
msg = { code = "code", format = "format", data = "data", label = "label", srcid = srcid, algorithm = "algorithm", pubkey = "pubkey", hash = "hash", hashtype = "hash" }
code: A hex string from '00' to 'ff' indicating the meaning of the message.
format: A string declaring the type of content in 'data'. This allows us to support picture, video, and other formats.
data: A string containing the message itself.
label: A string containing the label of the sender. Clients can send nil instead, but servers must send their label.
srcid: The ID of the origin computer. This allows us to use rednet repeaters without really needing to try too hard.
algorithm: The algorithm used to encrypt the info in 'data'.
pubkey: The public key to be used for encrypting the reply (if any).
hash: A hash of the original, unencrypted message to be used in verifying that the data was decrypted properly. It must be sent, but it does not have to be used.
hashtype: The algorithm used to generate the hash.
Returns a table received from the target. This method will wait up to ten seconds for a response from the target before giving up.
rdtps.receive(t)
Waits for any rednet message. Usually for servers only.
If it times out, it will likely lead to a 10 error.
Returns a table.
rdtps.replyTo(targetID, code, format, data, label, srcid, algorithm, pubkey, hash, hashtype)
Sends a table to the target:
msg = { code = "code", format = "format", data = "data", label = "label", srcid = srcid, algorithm = "algorithm", pubkey = "pubkey", hash = "hash", hashtype = "hash" }
code: A hex string from '00' to 'ff' indicating the meaning of the message.
format: A string declaring the type of content in 'data'. This allows us to support picture, video, and other formats.
data: A string containing the message itself.
label: A string containing the label of the sender. Clients can send nil instead, but servers must send their label.
srcid: The ID of the origin computer. This allows us to use rednet repeaters without really needing to try too hard.
algorithm: The algorithm used to encrypt the info in 'data'.
pubkey: The public key to be used for encrypting the reply (if any).
hash: A hash of the original, unencrypted message to be used in verifying that the data was decrypted properly. It must be sent, but it does not have to be used.
hashtype: The algorithm used to generate the hash.
Doesn't return anything.