net/client.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
362 B
Lua

package.path="?/init.lua;"..package.path
require("multi")
require("net")
client = net:newUDPClient("localhost",12345)
client.OnDataRecieved(function(self,data)
print(data)
end)
client.OnClientReady:holdUT() -- waots until the client is ready... You can also connect to this event as well and have code do stuff too
client:send("Hello Server!")
multi:mainloop()