-
Notifications
You must be signed in to change notification settings - Fork 4
Built in Functions
Ligustah edited this page Mar 18, 2011
·
4 revisions
This will establish a connection to the specified host and port. Upon success onConnect will be called.
Send one or more packets to the server currently connected to.
local login = Login("Miney", "Password")
send(Handshake("Miney"), login)
Add a callback to be called at a given interval. Interval is in milli seconds. No guarantee is made as to how precise the interval is.
The callback can be any callable type. If the callback returns a value that is considered true (see toBool in the StdLib) the timer is stopped.
Returns the ID used for this timer.
local id = setTimer(1000, function()
{
writeln $ "This would run once a second!"
writeln $ "But it will stop itself :O"
return true
})
Stop a timer given an ID.