From 9269d6be328e5ca0be3ce9bdb45017e97c799890 Mon Sep 17 00:00:00 2001 From: Fabio Alessandrelli Date: Mon, 25 Nov 2019 17:36:09 +0100 Subject: UDP sockets broadcast is now disabled by default. Add method `set_broadcast_enabled` to allow enabling broadcast via GDScript. --- doc/classes/PacketPeerUDP.xml | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'doc/classes/PacketPeerUDP.xml') diff --git a/doc/classes/PacketPeerUDP.xml b/doc/classes/PacketPeerUDP.xml index 260dbae8e2..d1b159ec54 100644 --- a/doc/classes/PacketPeerUDP.xml +++ b/doc/classes/PacketPeerUDP.xml @@ -76,6 +76,15 @@ 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). + + + + + + + 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. + + @@ -85,6 +94,7 @@ 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]). -- cgit v1.2.3 From 04c917899f1bfba7fbae8f20b602f726f43102d6 Mon Sep 17 00:00:00 2001 From: Fabio Alessandrelli Date: Mon, 25 Nov 2019 15:01:44 +0100 Subject: Add Android NetSocket implementation. Automatically acquire and release multicast lock when needed. --- doc/classes/PacketPeerUDP.xml | 2 ++ 1 file changed, 2 insertions(+) (limited to 'doc/classes/PacketPeerUDP.xml') diff --git a/doc/classes/PacketPeerUDP.xml b/doc/classes/PacketPeerUDP.xml index d1b159ec54..3dc83ce8b4 100644 --- a/doc/classes/PacketPeerUDP.xml +++ b/doc/classes/PacketPeerUDP.xml @@ -47,6 +47,7 @@ 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. @@ -83,6 +84,7 @@ 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. -- cgit v1.2.3