diff --git a/core/io/packet_peer.cpp b/core/io/packet_peer.cpp index 22b8bc0b39e..8e96697ac94 100644 --- a/core/io/packet_peer.cpp +++ b/core/io/packet_peer.cpp @@ -126,7 +126,7 @@ Error PacketPeer::_get_packet_error() const { void PacketPeer::_bind_methods() { - ObjectTypeDB::bind_method(_MD("get_var"),&PacketPeer::_bnd_get_var); + ObjectTypeDB::bind_method(_MD("get_var:Variant"),&PacketPeer::_bnd_get_var); ObjectTypeDB::bind_method(_MD("put_var", "var:Variant"),&PacketPeer::put_var); ObjectTypeDB::bind_method(_MD("get_packet"),&PacketPeer::_get_packet); ObjectTypeDB::bind_method(_MD("put_packet:Error", "buffer"),&PacketPeer::_put_packet); diff --git a/doc/base/classes.xml b/doc/base/classes.xml index 4db81f487ca..63be9ca4177 100644 --- a/doc/base/classes.xml +++ b/doc/base/classes.xml @@ -6883,6 +6883,12 @@ Return a rect containing the editable contents of the item. + + + + + + @@ -15837,6 +15843,27 @@ Example: (content-length:12), (Content-Type:application/json; charset=UTF-8) Returns the duration of the current vibration effect in seconds. + + + + + + + + + + + + Starts to vibrate the joystick. Joysticks usually come with two rumble motors, a strong and a weak one. weak_magnitude is the strength of the weak motor (between 0 and 1) and strong_magnitude is the strength of the strong motor (between 0 and 1). duration is the duration of the effect in seconds (a duration of 0 will play the vibration indefinitely). + + + + + + + Stops the vibration of the joystick. + + @@ -15879,26 +15906,6 @@ Example: (content-length:12), (Content-Type:application/json; charset=UTF-8) Return the mouse mode. See the constants for more information. - - - - - - - - - - - Starts to vibrate the joystick. Joysticks usually come with two rumble motors, a strong and a weak one. weak_magnitude is the strength of the weak motor (between 0 and 1) and strong_magnitude is the strength of the strong motor (between 0 and 1). duration is the duration of the effect in seconds (a duration of 0 will play the vibration indefinitely). - - - - - - - Stops the vibration of the joystick. - - @@ -23471,7 +23478,10 @@ Example: (content-length:12), (Content-Type:application/json; charset=UTF-8) + + + Get a Variant. @@ -23480,12 +23490,14 @@ Example: (content-length:12), (Content-Type:application/json; charset=UTF-8) + Send a Variant as a packet. + Get a raw packet. @@ -23494,18 +23506,21 @@ Example: (content-length:12), (Content-Type:application/json; charset=UTF-8) + Send a raw packet. + Return the error state of the last packet received (via [method get_packet] and [method get_var]). + Return the number of packets currently available in the ring-buffer. @@ -23533,8 +23548,10 @@ Example: (content-length:12), (Content-Type:application/json; charset=UTF-8) + UDP packet peer. + UDP packet peer. Can be used to send raw UDP packets as well as [Variant]s. @@ -23545,40 +23562,47 @@ Example: (content-length:12), (Content-Type:application/json; charset=UTF-8) + Make this [PacketPeerUDP] listen on the "port" using a buffer size "recv_buf_size". Listens on all available adresses. + Close the UDP socket the [PacketPeerUDP] is currently listening on. + Wait for a packet to arrive on the listening port, see [method listen]. + Return whether this [PacketPeerUDP] is listening. + Return the IP of the remote peer that sent the last packet(that was received with [method get_packet] or [method get_var]). + 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]). + Return the port of the remote peer that sent the last packet(that was received with [method get_packet] or [method get_var]). @@ -23589,6 +23613,7 @@ Example: (content-length:12), (Content-Type:application/json; charset=UTF-8) + Set the destination address and port for sending packets and variables, a hostname will be resolved if valid. @@ -36779,7 +36804,7 @@ This method controls whether the position between two cached points is interpola - Put a variable into the stream. + Put a Variant into the stream. @@ -36874,7 +36899,7 @@ This method controls whether the position between two cached points is interpola - Get a variable from the stream. + Get a Variant from the stream. @@ -36925,16 +36950,16 @@ This method controls whether the position between two cached points is interpola - A status representing a [StreamPeerSSL] that is disconnected. + A status representing a [StreamPeerSSL] that is disconnected. - A status representing a [StreamPeerSSL] that is connected to a host. + A status representing a [StreamPeerSSL] that is connected to a host. - An errot status that shows the peer did not present a SSL certificate and validation was requested. + An errot status that shows the peer did not present a SSL certificate and validation was requested. - An error status that shows a mismatch in the SSL certificate domain presented by the host and the domain requested for validation. + An error status that shows a mismatch in the SSL certificate domain presented by the host and the domain requested for validation. @@ -36993,16 +37018,16 @@ This method controls whether the position between two cached points is interpola - The initial status of the [StreamPeerTCP], also the status after a disconnect. + The initial status of the [StreamPeerTCP], also the status after a disconnect. - A status representing a [StreamPeerTCP] that is connecting to a host. + A status representing a [StreamPeerTCP] that is connecting to a host. - A status representing a [StreamPeerTCP] that is connected to a host. + A status representing a [StreamPeerTCP] that is connected to a host. - A staus representing a [StreamPeerTCP] in error state. + A staus representing a [StreamPeerTCP] in error state. @@ -42931,7 +42956,7 @@ This method controls whether the position between two cached points is interpola - + @@ -45339,7 +45364,7 @@ This method controls whether the position between two cached points is interpola - +