summaryrefslogtreecommitdiff
path: root/doc/classes
diff options
context:
space:
mode:
authorFabio Alessandrelli <fabio.alessandrelli@gmail.com>2019-11-25 17:36:09 +0100
committerFabio Alessandrelli <fabio.alessandrelli@gmail.com>2019-12-14 17:48:16 +0100
commit9269d6be328e5ca0be3ce9bdb45017e97c799890 (patch)
tree2ce32cd37b7a4b747d6413bfe5c74d929ff0b008 /doc/classes
parentab1bfb9007f7d1cca9bb45abfc1559fbbebb4f8a (diff)
UDP sockets broadcast is now disabled by default.
Add method `set_broadcast_enabled` to allow enabling broadcast via GDScript.
Diffstat (limited to 'doc/classes')
-rw-r--r--doc/classes/PacketPeerUDP.xml10
1 files changed, 10 insertions, 0 deletions
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).
</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.
+ </description>
+ </method>
<method name="set_dest_address">
<return type="int" enum="Error">
</return>
@@ -85,6 +94,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">