Classref: added PacketPeer*
This commit is contained in:
parent
6bbc53ee18
commit
541a1226cd
|
@ -23478,7 +23478,10 @@ Example: (content-length:12), (Content-Type:application/json; charset=UTF-8)
|
||||||
</description>
|
</description>
|
||||||
<methods>
|
<methods>
|
||||||
<method name="get_var" qualifiers="const">
|
<method name="get_var" qualifiers="const">
|
||||||
|
<return type="Variant">
|
||||||
|
</return>
|
||||||
<description>
|
<description>
|
||||||
|
Get a Variant.
|
||||||
</description>
|
</description>
|
||||||
</method>
|
</method>
|
||||||
<method name="put_var">
|
<method name="put_var">
|
||||||
|
@ -23487,12 +23490,14 @@ Example: (content-length:12), (Content-Type:application/json; charset=UTF-8)
|
||||||
<argument index="0" name="var" type="Variant">
|
<argument index="0" name="var" type="Variant">
|
||||||
</argument>
|
</argument>
|
||||||
<description>
|
<description>
|
||||||
|
Send a Variant as a packet.
|
||||||
</description>
|
</description>
|
||||||
</method>
|
</method>
|
||||||
<method name="get_packet" qualifiers="const">
|
<method name="get_packet" qualifiers="const">
|
||||||
<return type="RawArray">
|
<return type="RawArray">
|
||||||
</return>
|
</return>
|
||||||
<description>
|
<description>
|
||||||
|
Get a raw packet.
|
||||||
</description>
|
</description>
|
||||||
</method>
|
</method>
|
||||||
<method name="put_packet">
|
<method name="put_packet">
|
||||||
|
@ -23501,18 +23506,21 @@ Example: (content-length:12), (Content-Type:application/json; charset=UTF-8)
|
||||||
<argument index="0" name="buffer" type="RawArray">
|
<argument index="0" name="buffer" type="RawArray">
|
||||||
</argument>
|
</argument>
|
||||||
<description>
|
<description>
|
||||||
|
Send a raw packet.
|
||||||
</description>
|
</description>
|
||||||
</method>
|
</method>
|
||||||
<method name="get_packet_error" qualifiers="const">
|
<method name="get_packet_error" qualifiers="const">
|
||||||
<return type="Error">
|
<return type="Error">
|
||||||
</return>
|
</return>
|
||||||
<description>
|
<description>
|
||||||
|
Return the error state of the last packet received (via [method get_packet] and [method get_var]).
|
||||||
</description>
|
</description>
|
||||||
</method>
|
</method>
|
||||||
<method name="get_available_packet_count" qualifiers="const">
|
<method name="get_available_packet_count" qualifiers="const">
|
||||||
<return type="int">
|
<return type="int">
|
||||||
</return>
|
</return>
|
||||||
<description>
|
<description>
|
||||||
|
Return the number of packets currently available in the ring-buffer.
|
||||||
</description>
|
</description>
|
||||||
</method>
|
</method>
|
||||||
</methods>
|
</methods>
|
||||||
|
@ -23540,8 +23548,10 @@ Example: (content-length:12), (Content-Type:application/json; charset=UTF-8)
|
||||||
</class>
|
</class>
|
||||||
<class name="PacketPeerUDP" inherits="PacketPeer" category="Core">
|
<class name="PacketPeerUDP" inherits="PacketPeer" category="Core">
|
||||||
<brief_description>
|
<brief_description>
|
||||||
|
UDP packet peer.
|
||||||
</brief_description>
|
</brief_description>
|
||||||
<description>
|
<description>
|
||||||
|
UDP packet peer. Can be used to send raw UDP packets as well as [Variant]s.
|
||||||
</description>
|
</description>
|
||||||
<methods>
|
<methods>
|
||||||
<method name="listen">
|
<method name="listen">
|
||||||
|
@ -23552,40 +23562,47 @@ Example: (content-length:12), (Content-Type:application/json; charset=UTF-8)
|
||||||
<argument index="1" name="recv_buf_size" type="int" default="65536">
|
<argument index="1" name="recv_buf_size" type="int" default="65536">
|
||||||
</argument>
|
</argument>
|
||||||
<description>
|
<description>
|
||||||
|
Make this [PacketPeerUDP] listen on the "port" using a buffer size "recv_buf_size". Listens on all available adresses.
|
||||||
</description>
|
</description>
|
||||||
</method>
|
</method>
|
||||||
<method name="close">
|
<method name="close">
|
||||||
<description>
|
<description>
|
||||||
|
Close the UDP socket the [PacketPeerUDP] is currently listening on.
|
||||||
</description>
|
</description>
|
||||||
</method>
|
</method>
|
||||||
<method name="wait">
|
<method name="wait">
|
||||||
<return type="Error">
|
<return type="Error">
|
||||||
</return>
|
</return>
|
||||||
<description>
|
<description>
|
||||||
|
Wait for a packet to arrive on the listening port, see [method listen].
|
||||||
</description>
|
</description>
|
||||||
</method>
|
</method>
|
||||||
<method name="is_listening" qualifiers="const">
|
<method name="is_listening" qualifiers="const">
|
||||||
<return type="bool">
|
<return type="bool">
|
||||||
</return>
|
</return>
|
||||||
<description>
|
<description>
|
||||||
|
Return whether this [PacketPeerUDP] is listening.
|
||||||
</description>
|
</description>
|
||||||
</method>
|
</method>
|
||||||
<method name="get_packet_ip" qualifiers="const">
|
<method name="get_packet_ip" qualifiers="const">
|
||||||
<return type="String">
|
<return type="String">
|
||||||
</return>
|
</return>
|
||||||
<description>
|
<description>
|
||||||
|
Return the IP of the remote peer that sent the last packet(that was received with [method get_packet] or [method get_var]).
|
||||||
</description>
|
</description>
|
||||||
</method>
|
</method>
|
||||||
<method name="get_packet_address" qualifiers="const">
|
<method name="get_packet_address" qualifiers="const">
|
||||||
<return type="int">
|
<return type="int">
|
||||||
</return>
|
</return>
|
||||||
<description>
|
<description>
|
||||||
|
Return the address of the remote peer(as a 32bit integer) that sent the last packet(that was received with [method get_packet] or [method get_var]).
|
||||||
</description>
|
</description>
|
||||||
</method>
|
</method>
|
||||||
<method name="get_packet_port" qualifiers="const">
|
<method name="get_packet_port" qualifiers="const">
|
||||||
<return type="int">
|
<return type="int">
|
||||||
</return>
|
</return>
|
||||||
<description>
|
<description>
|
||||||
|
Return the port of the remote peer that sent the last packet(that was received with [method get_packet] or [method get_var]).
|
||||||
</description>
|
</description>
|
||||||
</method>
|
</method>
|
||||||
<method name="set_send_address">
|
<method name="set_send_address">
|
||||||
|
@ -23596,6 +23613,7 @@ Example: (content-length:12), (Content-Type:application/json; charset=UTF-8)
|
||||||
<argument index="1" name="port" type="int">
|
<argument index="1" name="port" type="int">
|
||||||
</argument>
|
</argument>
|
||||||
<description>
|
<description>
|
||||||
|
Set the destination address and port for sending packets and variables, a hostname will be resolved if valid.
|
||||||
</description>
|
</description>
|
||||||
</method>
|
</method>
|
||||||
</methods>
|
</methods>
|
||||||
|
@ -36786,7 +36804,7 @@ This method controls whether the position between two cached points is interpola
|
||||||
<argument index="0" name="val" type="Variant">
|
<argument index="0" name="val" type="Variant">
|
||||||
</argument>
|
</argument>
|
||||||
<description>
|
<description>
|
||||||
Put a variable into the stream.
|
Put a Variant into the stream.
|
||||||
</description>
|
</description>
|
||||||
</method>
|
</method>
|
||||||
<method name="get_8">
|
<method name="get_8">
|
||||||
|
@ -36881,7 +36899,7 @@ This method controls whether the position between two cached points is interpola
|
||||||
<return type="Variant">
|
<return type="Variant">
|
||||||
</return>
|
</return>
|
||||||
<description>
|
<description>
|
||||||
Get a variable from the stream.
|
Get a Variant from the stream.
|
||||||
</description>
|
</description>
|
||||||
</method>
|
</method>
|
||||||
</methods>
|
</methods>
|
||||||
|
|
Loading…
Reference in New Issue