Stary2001

server

Feb 4th, 2013
42
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.31 KB | None | 0 0
  1. dofile("common")
  2.  
  3. openRednet()
  4.  
  5. function processPacket(t)
  6. if type(t.type) ~= "string" then print("Got packet with non-string type.. something is wrong.") end
  7. if t.type == "connect" then
  8. print("Client '"..t.id.."' connected!")
  9. end
  10. end
  11.  
  12. print("Waiting for first client..")
  13. recvWithCallback(processPacket)
Advertisement
Add Comment
Please, Sign In to add comment