net/server.lua
Ryan Ward 859ae91395 Reworking the library
netold contains the older library. the new library has all the core features that  was in the old library.
2018-06-15 11:29:27 -04:00

11 lines
333 B
Lua

package.path="?/init.lua;"..package.path
require("multi")
require("net")
server = net:newUDPServer(12345)
print("Server hosted on "..net.getExternalIP().." listening on port: 12345")
server.OnDataRecieved(function(self,data,cid,ip,port)
print(data)
self:send(ip,"Hello Client! "..net.generateGUID(),port,cid)
end)
multi:mainloop()