diff options
author | RĂ©mi Verschelde <rverschelde@gmail.com> | 2019-12-14 21:53:08 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-12-14 21:53:08 +0100 |
commit | d3a07d3550bd6f56028c03b97a5194dc69a48a0e (patch) | |
tree | 687005c3d5c7d25b133c5abe3d2007b2a6085030 /doc/classes/PacketPeerUDP.xml | |
parent | a5dcabbbfb2a0b9c6688ea0b6f788491f350f5da (diff) | |
parent | 04c917899f1bfba7fbae8f20b602f726f43102d6 (diff) |
Merge pull request #33910 from Faless/net/android_mlock
Acquire MulticastLock on Android when using broadcast/multicast
Diffstat (limited to 'doc/classes/PacketPeerUDP.xml')
-rw-r--r-- | doc/classes/PacketPeerUDP.xml | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/doc/classes/PacketPeerUDP.xml b/doc/classes/PacketPeerUDP.xml index 260dbae8e2..3dc83ce8b4 100644 --- a/doc/classes/PacketPeerUDP.xml +++ b/doc/classes/PacketPeerUDP.xml @@ -47,6 +47,7 @@ <description> Joins the multicast group specified by [code]multicast_address[/code] using the interface identified by [code]interface_name[/code]. You can join the same multicast group with multiple interfaces. Use [method IP.get_local_interfaces] to know which are available. + Note: Some Android devices might require the [code]CHANGE_WIFI_MULTICAST_STATE[/code] permission for multicast to work. </description> </method> <method name="leave_multicast_group"> @@ -76,6 +77,16 @@ If [code]bind_address[/code] is set to any valid address (e.g. [code]"192.168.1.101"[/code], [code]"::1"[/code], etc), the peer will only listen on the interface with that addresses (or fail if no interface with the given address exists). </description> </method> + <method name="set_broadcast_enabled"> + <return type="void"> + </return> + <argument index="0" name="enabled" type="bool"> + </argument> + <description> + Enable or disable sending of broadcast packets (e.g. [code]set_dest_address("255.255.255.255", 4343)[/code]. This option is disabled by default. + Note: Some Android devices might require the [code]CHANGE_WIFI_MULTICAST_STATE[/code] permission and this option to be enabled to receive broadcast packets too. + </description> + </method> <method name="set_dest_address"> <return type="int" enum="Error"> </return> @@ -85,6 +96,7 @@ </argument> <description> Sets the destination address and port for sending packets and variables. A hostname will be resolved using DNS if needed. + Note: [method set_broadcast_enabled] must be enabled before sending packets to a broadcast address (e.g. [code]255.255.255.255[/code]). </description> </method> <method name="wait"> |