What it does
CreateUDPListener brings a Multiplayer object into being: it is how the rest of the program comes to have one. It takes ip (a string) and port (an integer), and answers an integer. That is the first of 2 forms.
Syntax
1
CreateUDPListener(ip string, port integer) → integer2
CreateUDPListener(listenerID integer, ip string, port integer) → integerParameters
| Name | Type | In forms |
|---|---|---|
| ip | string | all |
| port | integer | all |
| listenerID | integer | 2 |
Every form returns
integer
Example · generated
Form 1, the short one
uDPListener = CreateUDPListener("value", 1)DO Sync()LOOPForm 2, with every argument
uDPListener = CreateUDPListener(1, "value", 1)DO Sync()LOOPCreateUDPListener is called and its answer is printed every frame. The DO … LOOP is not decoration: a classic BASIC program ends the moment it runs out of lines, and Sync() is what draws the frame.