Advertisement
DOGGYWOOF

remote "client"

Feb 29th, 2024 (edited)
13
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.40 KB | None | 0 0
  1. -- client program
  2. local serverID = 123 -- Replace with the server's computer ID
  3.  
  4. while true do
  5. write("Enter command: ")
  6. local command = read()
  7.  
  8. -- Send the command to the server
  9. rednet.send(serverID, command)
  10.  
  11. -- Wait for the server's response
  12. local _, response = os.pullEvent("rednet_message")
  13.  
  14. -- Print the server's response
  15. print("Server response: " .. tostring(response))
  16. end
  17.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement