EasyUDPSocket.Register

From Xojo Documentation

Revision as of 00:11, 24 August 2017 by PLefebvre (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Method

EasyUDPSocket.Register(GroupName as String)

Supported for all project types and targets.

Registers GroupName as an identifier for messages sent by SendMessageToGroup.

Notes

GroupName can be any string, which will be mapped it to a valid Class D IP address. Class D IP addresses are in the range: [224.0.0.0 to 239.255.255.255]. For example, you can call Register("My Cool App"), and it will be hashed to a valid Class D IP address. However, if you use a valid Class D IP address, it will use that without modifications.

Before calling Register, please set the port and call Connect.

Example

This example registers the user as a group member and updates the list. Everyone on the network who wants to join the group needs to use the same group name:

AutoDiscovery1.Register("MyGroup")
AutoDiscovery1.UpdateMemberList