sendSingleton
General
sendSingleton sends a singleton service request to every server connected to the token with the same name. Only the first sent singleton within a minute will be received by the event.
Usage
Client:sendSingleton(<string> singletonName, (ANY) data)
Returns: <boolean> success
The callback can be specified with setSingletonEvent.
Limitations
See action POST.
Example
Client:setSingletonEvent(5, "hello", function(singleton, date)
print(singleton, date)
end)
print("1st received:", Client:sendSingleton("hello", "Is anyone there?"))
wait(5)
print("2nd received:", Client:sendSingleton("hello", "HELLO! PLEASE ANSWER"))
wait(90)
print("3rd received:", Client:sendSingleton("hello", "ANSWER ASAP"))