Posted 05 January 2014 - 09:26 AM
Relay Network Protocol (RNP) is a simple peer-to-peer network protocol, created by ericjet91, who kindly asked me to post this on the forums for him. RNP is available in API form as well as a relay using the specification (RNPRelay).
To receive messages:
RNPRelay
Documentation
To load the API (if you saved it as "RNP"), just use:
os.loadAPI("RNP")
RNP.start()
To broadcast data:
RNP.broadcast(string type, string src, string dest, dat)
Where type is the Lua type of the data, src is the sender of the file (use RNP.name if unsure), dest is the destination computer's RNP.name, and dat is the data sentTo receive messages:
RNP.receive(type)
Where type is the type of message received. It returns{ string type, string source, string dest, table step, dat }
Step lists all nodes the message was sent through. If a node is already on the step list it doesn't forward the packet.Programs using RNP
If anyone develops a program using RNP, PM me a link to the forum post and I'll add it to the list.RNPRelay
Edited on 05 January 2014 - 09:02 AM