Classref: added PacketPeer*

This commit is contained in:
J08nY 2016-06-15 22:54:21 +02:00
parent 6bbc53ee18
commit 541a1226cd
No known key found for this signature in database
GPG key ID: 7F4A448FE68F329D

View file

@ -23478,7 +23478,10 @@ Example: (content-length:12), (Content-Type:application/json; charset=UTF-8)
</description>
<methods>
<method name="get_var" qualifiers="const">
<return type="Variant">
</return>
<description>
Get a Variant.
</description>
</method>
<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>
<description>
Send a Variant as a packet.
</description>
</method>
<method name="get_packet" qualifiers="const">
<return type="RawArray">
</return>
<description>
Get a raw packet.
</description>
</method>
<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>
<description>
Send a raw packet.
</description>
</method>
<method name="get_packet_error" qualifiers="const">
<return type="Error">
</return>
<description>
Return the error state of the last packet received (via [method get_packet] and [method get_var]).
</description>
</method>
<method name="get_available_packet_count" qualifiers="const">
<return type="int">
</return>
<description>
Return the number of packets currently available in the ring-buffer.
</description>
</method>
</methods>
@ -23540,8 +23548,10 @@ Example: (content-length:12), (Content-Type:application/json; charset=UTF-8)
</class>
<class name="PacketPeerUDP" inherits="PacketPeer" category="Core">
<brief_description>
UDP packet peer.
</brief_description>
<description>
UDP packet peer. Can be used to send raw UDP packets as well as [Variant]s.
</description>
<methods>
<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>
<description>
Make this [PacketPeerUDP] listen on the "port" using a buffer size "recv_buf_size". Listens on all available adresses.
</description>
</method>
<method name="close">
<description>
Close the UDP socket the [PacketPeerUDP] is currently listening on.
</description>
</method>
<method name="wait">
<return type="Error">
</return>
<description>
Wait for a packet to arrive on the listening port, see [method listen].
</description>
</method>
<method name="is_listening" qualifiers="const">
<return type="bool">
</return>
<description>
Return whether this [PacketPeerUDP] is listening.
</description>
</method>
<method name="get_packet_ip" qualifiers="const">
<return type="String">
</return>
<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>
</method>
<method name="get_packet_address" qualifiers="const">
<return type="int">
</return>
<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>
</method>
<method name="get_packet_port" qualifiers="const">
<return type="int">
</return>
<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>
</method>
<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>
<description>
Set the destination address and port for sending packets and variables, a hostname will be resolved if valid.
</description>
</method>
</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>
<description>
Put a variable into the stream.
Put a Variant into the stream.
</description>
</method>
<method name="get_8">
@ -36881,7 +36899,7 @@ This method controls whether the position between two cached points is interpola
<return type="Variant">
</return>
<description>
Get a variable from the stream.
Get a Variant from the stream.
</description>
</method>
</methods>