Closed VaughnRupp closed 8 years ago
I have added a Broadcast method to the Service object type now. I left it hardcoded at 10051 for an IP, but Param 1 = Group which you can pick a unique group name to keep other listeners from hearing the message.
I have not tested it, but the code it pretty simple, so I hope it works.
Here is the code to send the message. Put whatever you want in param2 and parse it if you need multiple fields. Other code is currently splitting on |
case "BROADCAST": Log.Info("-> UDP: " + method.Parameter1 + ", " + method.Parameter2); UDPConnection.SendObject(method.Parameter1, method.Parameter2, new IPEndPoint(IPAddress.Broadcast, 10051)); break;
New non-plugin clients and non-standard servers need access to a scriptable method to send UDP broadcasts.