CreateBroadcastListener - AGK Help

CreateBroadcastListener

Description

Broadcasts are special network communications as they do not use a destination address and are instead received by all devices on a network. Broadcast packets are not forwarded by routers so can only be used on the local area network, or more specifically the local subnet. This can be useful for discovering devices as one device can send a broadcast packet containing its IP address and another device can pick it up, read the IP and connect back to the first device to create a two-way connection.

AGK networks are broadcast in this manner on port 45631 and send a packet containing the name of a network that has been hosted by another AGK device. By using a broadcast listener you can pick these messages up, extract the network names and display them to the user for them to choose which network they want to connect to.

Returns an ID you can use to interact with this broadcast listener.

Definition

integer CreateBroadcastListener( port )

Parameters