Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local side = "top" -- Change as needed
- os.loadAPI("host")
- -- New DNS entry
- host.new("localhost",os.getComputerID()) -- "localhost" is name
- rednet.open(side)
- rednet.send(host.getID("localhost"),"TEST!")
- local event,id,msg = os.pullEvent()
- if event == "rednet_message" then
- print("ID: "..id) -- ID given to us by rednet
- print("MSG: "..msg) -- Message
- -- Get name of ID
- print("DNS: "..host.getName(id))
- -- Name set for ID set by DNS (confirmation of it working)
- print("DNS ID: "..host.getID(host.getName(id)))
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement