Classref: Added docs for StreamPeer* (#5216)
(cherry picked from commit cffdc52482
)
This commit is contained in:
parent
0b8cf7946e
commit
109e58cf75
|
@ -357,7 +357,6 @@ String StreamPeer::get_string(int p_bytes){
|
||||||
String StreamPeer::get_utf8_string(int p_bytes){
|
String StreamPeer::get_utf8_string(int p_bytes){
|
||||||
|
|
||||||
ERR_FAIL_COND_V(p_bytes<0,String());
|
ERR_FAIL_COND_V(p_bytes<0,String());
|
||||||
ERR_FAIL_COND_V(p_bytes<0,String());
|
|
||||||
|
|
||||||
Vector<uint8_t> buf;
|
Vector<uint8_t> buf;
|
||||||
buf.resize(p_bytes);
|
buf.resize(p_bytes);
|
||||||
|
|
|
@ -34532,150 +34532,175 @@ This method controls whether the position between two cached points is interpola
|
||||||
<return type="int">
|
<return type="int">
|
||||||
</return>
|
</return>
|
||||||
<description>
|
<description>
|
||||||
|
Return the amount of bytes this [StreamPeer] has available.
|
||||||
</description>
|
</description>
|
||||||
</method>
|
</method>
|
||||||
<method name="set_big_endian">
|
<method name="set_big_endian">
|
||||||
<argument index="0" name="enable" type="bool">
|
<argument index="0" name="enable" type="bool">
|
||||||
</argument>
|
</argument>
|
||||||
<description>
|
<description>
|
||||||
|
Set this [StreamPeer] to use big-endian format. Default is false.
|
||||||
</description>
|
</description>
|
||||||
</method>
|
</method>
|
||||||
<method name="is_big_endian_enabled" qualifiers="const">
|
<method name="is_big_endian_enabled" qualifiers="const">
|
||||||
<return type="bool">
|
<return type="bool">
|
||||||
</return>
|
</return>
|
||||||
<description>
|
<description>
|
||||||
|
Return whether this [StreamPeer] is using big-endian format.
|
||||||
</description>
|
</description>
|
||||||
</method>
|
</method>
|
||||||
<method name="put_8">
|
<method name="put_8">
|
||||||
<argument index="0" name="val" type="int">
|
<argument index="0" name="val" type="int">
|
||||||
</argument>
|
</argument>
|
||||||
<description>
|
<description>
|
||||||
|
Put a signed byte into the stream.
|
||||||
</description>
|
</description>
|
||||||
</method>
|
</method>
|
||||||
<method name="put_u8">
|
<method name="put_u8">
|
||||||
<argument index="0" name="val" type="int">
|
<argument index="0" name="val" type="int">
|
||||||
</argument>
|
</argument>
|
||||||
<description>
|
<description>
|
||||||
|
Put an unsigned byte into the stream.
|
||||||
</description>
|
</description>
|
||||||
</method>
|
</method>
|
||||||
<method name="put_16">
|
<method name="put_16">
|
||||||
<argument index="0" name="val" type="int">
|
<argument index="0" name="val" type="int">
|
||||||
</argument>
|
</argument>
|
||||||
<description>
|
<description>
|
||||||
|
Put a signed 16 bit value into the stream.
|
||||||
</description>
|
</description>
|
||||||
</method>
|
</method>
|
||||||
<method name="put_u16">
|
<method name="put_u16">
|
||||||
<argument index="0" name="val" type="int">
|
<argument index="0" name="val" type="int">
|
||||||
</argument>
|
</argument>
|
||||||
<description>
|
<description>
|
||||||
|
Put an unsigned 16 bit value into the stream.
|
||||||
</description>
|
</description>
|
||||||
</method>
|
</method>
|
||||||
<method name="put_32">
|
<method name="put_32">
|
||||||
<argument index="0" name="val" type="int">
|
<argument index="0" name="val" type="int">
|
||||||
</argument>
|
</argument>
|
||||||
<description>
|
<description>
|
||||||
|
Put a signed 32 bit value into the stream.
|
||||||
</description>
|
</description>
|
||||||
</method>
|
</method>
|
||||||
<method name="put_u32">
|
<method name="put_u32">
|
||||||
<argument index="0" name="val" type="int">
|
<argument index="0" name="val" type="int">
|
||||||
</argument>
|
</argument>
|
||||||
<description>
|
<description>
|
||||||
|
Put an unsigned 32 bit value into the stream.
|
||||||
</description>
|
</description>
|
||||||
</method>
|
</method>
|
||||||
<method name="put_64">
|
<method name="put_64">
|
||||||
<argument index="0" name="val" type="int">
|
<argument index="0" name="val" type="int">
|
||||||
</argument>
|
</argument>
|
||||||
<description>
|
<description>
|
||||||
|
Put a signed 64 bit value into the stream.
|
||||||
</description>
|
</description>
|
||||||
</method>
|
</method>
|
||||||
<method name="put_u64">
|
<method name="put_u64">
|
||||||
<argument index="0" name="val" type="int">
|
<argument index="0" name="val" type="int">
|
||||||
</argument>
|
</argument>
|
||||||
<description>
|
<description>
|
||||||
|
Put an unsigned 64 bit value into the stream.
|
||||||
</description>
|
</description>
|
||||||
</method>
|
</method>
|
||||||
<method name="put_float">
|
<method name="put_float">
|
||||||
<argument index="0" name="val" type="float">
|
<argument index="0" name="val" type="float">
|
||||||
</argument>
|
</argument>
|
||||||
<description>
|
<description>
|
||||||
|
Put a single-precision float into the stream.
|
||||||
</description>
|
</description>
|
||||||
</method>
|
</method>
|
||||||
<method name="put_double">
|
<method name="put_double">
|
||||||
<argument index="0" name="val" type="float">
|
<argument index="0" name="val" type="float">
|
||||||
</argument>
|
</argument>
|
||||||
<description>
|
<description>
|
||||||
|
Put a double-precision float into the stream.
|
||||||
</description>
|
</description>
|
||||||
</method>
|
</method>
|
||||||
<method name="put_utf8_string">
|
<method name="put_utf8_string">
|
||||||
<argument index="0" name="val" type="String">
|
<argument index="0" name="val" type="String">
|
||||||
</argument>
|
</argument>
|
||||||
<description>
|
<description>
|
||||||
|
Put a zero-terminated utf8 string into the stream.
|
||||||
</description>
|
</description>
|
||||||
</method>
|
</method>
|
||||||
<method name="put_var">
|
<method name="put_var">
|
||||||
<argument index="0" name="val" type="Variant">
|
<argument index="0" name="val" type="Variant">
|
||||||
</argument>
|
</argument>
|
||||||
<description>
|
<description>
|
||||||
|
Put a variable into the stream.
|
||||||
</description>
|
</description>
|
||||||
</method>
|
</method>
|
||||||
<method name="get_8">
|
<method name="get_8">
|
||||||
<return type="int">
|
<return type="int">
|
||||||
</return>
|
</return>
|
||||||
<description>
|
<description>
|
||||||
|
Get a signed byte from the stream.
|
||||||
</description>
|
</description>
|
||||||
</method>
|
</method>
|
||||||
<method name="get_u8">
|
<method name="get_u8">
|
||||||
<return type="int">
|
<return type="int">
|
||||||
</return>
|
</return>
|
||||||
<description>
|
<description>
|
||||||
|
Get an unsigned byte from the stream.
|
||||||
</description>
|
</description>
|
||||||
</method>
|
</method>
|
||||||
<method name="get_16">
|
<method name="get_16">
|
||||||
<return type="int">
|
<return type="int">
|
||||||
</return>
|
</return>
|
||||||
<description>
|
<description>
|
||||||
|
Get a signed 16 bit value from the stream.
|
||||||
</description>
|
</description>
|
||||||
</method>
|
</method>
|
||||||
<method name="get_u16">
|
<method name="get_u16">
|
||||||
<return type="int">
|
<return type="int">
|
||||||
</return>
|
</return>
|
||||||
<description>
|
<description>
|
||||||
|
Get an unsigned 16 bit value from the stream.
|
||||||
</description>
|
</description>
|
||||||
</method>
|
</method>
|
||||||
<method name="get_32">
|
<method name="get_32">
|
||||||
<return type="int">
|
<return type="int">
|
||||||
</return>
|
</return>
|
||||||
<description>
|
<description>
|
||||||
|
Get a signed 32 bit value from the stream.
|
||||||
</description>
|
</description>
|
||||||
</method>
|
</method>
|
||||||
<method name="get_u32">
|
<method name="get_u32">
|
||||||
<return type="int">
|
<return type="int">
|
||||||
</return>
|
</return>
|
||||||
<description>
|
<description>
|
||||||
|
Get an unsigned 32 bit value from the stream.
|
||||||
</description>
|
</description>
|
||||||
</method>
|
</method>
|
||||||
<method name="get_64">
|
<method name="get_64">
|
||||||
<return type="int">
|
<return type="int">
|
||||||
</return>
|
</return>
|
||||||
<description>
|
<description>
|
||||||
|
Get a signed 64 bit value from the stream.
|
||||||
</description>
|
</description>
|
||||||
</method>
|
</method>
|
||||||
<method name="get_u64">
|
<method name="get_u64">
|
||||||
<return type="int">
|
<return type="int">
|
||||||
</return>
|
</return>
|
||||||
<description>
|
<description>
|
||||||
|
Get an unsigned 16 bit value from the stream.
|
||||||
</description>
|
</description>
|
||||||
</method>
|
</method>
|
||||||
<method name="get_float">
|
<method name="get_float">
|
||||||
<return type="float">
|
<return type="float">
|
||||||
</return>
|
</return>
|
||||||
<description>
|
<description>
|
||||||
|
Get a single-precision float from the stream.
|
||||||
</description>
|
</description>
|
||||||
</method>
|
</method>
|
||||||
<method name="get_double">
|
<method name="get_double">
|
||||||
<return type="float">
|
<return type="float">
|
||||||
</return>
|
</return>
|
||||||
<description>
|
<description>
|
||||||
|
Get a double-precision float from the stream.
|
||||||
</description>
|
</description>
|
||||||
</method>
|
</method>
|
||||||
<method name="get_string">
|
<method name="get_string">
|
||||||
|
@ -34684,6 +34709,7 @@ This method controls whether the position between two cached points is interpola
|
||||||
<argument index="0" name="bytes" type="int">
|
<argument index="0" name="bytes" type="int">
|
||||||
</argument>
|
</argument>
|
||||||
<description>
|
<description>
|
||||||
|
Get a string with byte-length "bytes" from the stream.
|
||||||
</description>
|
</description>
|
||||||
</method>
|
</method>
|
||||||
<method name="get_utf8_string">
|
<method name="get_utf8_string">
|
||||||
|
@ -34692,12 +34718,14 @@ This method controls whether the position between two cached points is interpola
|
||||||
<argument index="0" name="bytes" type="int">
|
<argument index="0" name="bytes" type="int">
|
||||||
</argument>
|
</argument>
|
||||||
<description>
|
<description>
|
||||||
|
Get an utf8 string with byte-length "bytes" from the stream (this decodes the string sent as utf8).
|
||||||
</description>
|
</description>
|
||||||
</method>
|
</method>
|
||||||
<method name="get_var">
|
<method name="get_var">
|
||||||
<return type="Variant">
|
<return type="Variant">
|
||||||
</return>
|
</return>
|
||||||
<description>
|
<description>
|
||||||
|
Get a variable from the stream.
|
||||||
</description>
|
</description>
|
||||||
</method>
|
</method>
|
||||||
</methods>
|
</methods>
|
||||||
|
@ -34706,8 +34734,10 @@ This method controls whether the position between two cached points is interpola
|
||||||
</class>
|
</class>
|
||||||
<class name="StreamPeerSSL" inherits="StreamPeer" category="Core">
|
<class name="StreamPeerSSL" inherits="StreamPeer" category="Core">
|
||||||
<brief_description>
|
<brief_description>
|
||||||
|
SSL Stream peer.
|
||||||
</brief_description>
|
</brief_description>
|
||||||
<description>
|
<description>
|
||||||
|
SSL Stream peer. This object can be used to connect to SSL servers.
|
||||||
</description>
|
</description>
|
||||||
<methods>
|
<methods>
|
||||||
<method name="accept">
|
<method name="accept">
|
||||||
|
@ -34728,27 +34758,34 @@ This method controls whether the position between two cached points is interpola
|
||||||
<argument index="2" name="for_hostname" type="String" default="""">
|
<argument index="2" name="for_hostname" type="String" default="""">
|
||||||
</argument>
|
</argument>
|
||||||
<description>
|
<description>
|
||||||
|
Connect to a peer using an underlying [StreamPeer] "stream", when "validate_certs" is true, [StreamPeerSSL] will validate that the certificate presented by the peer matches the "for_hostname".
|
||||||
</description>
|
</description>
|
||||||
</method>
|
</method>
|
||||||
<method name="get_status" qualifiers="const">
|
<method name="get_status" qualifiers="const">
|
||||||
<return type="int">
|
<return type="int">
|
||||||
</return>
|
</return>
|
||||||
<description>
|
<description>
|
||||||
|
Return the status of the connection, one of STATUS_* enum.
|
||||||
</description>
|
</description>
|
||||||
</method>
|
</method>
|
||||||
<method name="disconnect">
|
<method name="disconnect">
|
||||||
<description>
|
<description>
|
||||||
|
Disconnect from host.
|
||||||
</description>
|
</description>
|
||||||
</method>
|
</method>
|
||||||
</methods>
|
</methods>
|
||||||
<constants>
|
<constants>
|
||||||
<constant name="STATUS_DISCONNECTED" value="0">
|
<constant name="STATUS_DISCONNECTED" value="0">
|
||||||
|
A status representing a [StreamPeerSSL] that is disconnected.
|
||||||
</constant>
|
</constant>
|
||||||
<constant name="STATUS_CONNECTED" value="1">
|
<constant name="STATUS_CONNECTED" value="1">
|
||||||
|
A status representing a [StreamPeerSSL] that is connected to a host.
|
||||||
</constant>
|
</constant>
|
||||||
<constant name="STATUS_ERROR_NO_CERTIFICATE" value="2">
|
<constant name="STATUS_ERROR_NO_CERTIFICATE" value="2">
|
||||||
|
An errot status that shows the peer did not present a SSL certificate and validation was requested.
|
||||||
</constant>
|
</constant>
|
||||||
<constant name="STATUS_ERROR_HOSTNAME_MISMATCH" value="3">
|
<constant name="STATUS_ERROR_HOSTNAME_MISMATCH" value="3">
|
||||||
|
An error status that shows a mismatch in the SSL certificate domain presented by the host and the domain requested for validation.
|
||||||
</constant>
|
</constant>
|
||||||
</constants>
|
</constants>
|
||||||
</class>
|
</class>
|
||||||
|
@ -34768,45 +34805,55 @@ This method controls whether the position between two cached points is interpola
|
||||||
<argument index="1" name="port" type="int">
|
<argument index="1" name="port" type="int">
|
||||||
</argument>
|
</argument>
|
||||||
<description>
|
<description>
|
||||||
|
Connect to the specified IP:port pair. Returns [OK] on success or [FAILED] on failure.
|
||||||
</description>
|
</description>
|
||||||
</method>
|
</method>
|
||||||
<method name="is_connected" qualifiers="const">
|
<method name="is_connected" qualifiers="const">
|
||||||
<return type="bool">
|
<return type="bool">
|
||||||
</return>
|
</return>
|
||||||
<description>
|
<description>
|
||||||
|
Return whether this peer is connected. Returns true while connecting and connected.
|
||||||
</description>
|
</description>
|
||||||
</method>
|
</method>
|
||||||
<method name="get_status" qualifiers="const">
|
<method name="get_status" qualifiers="const">
|
||||||
<return type="int">
|
<return type="int">
|
||||||
</return>
|
</return>
|
||||||
<description>
|
<description>
|
||||||
|
Return the status of the connection, one of STATUS_* enum.
|
||||||
</description>
|
</description>
|
||||||
</method>
|
</method>
|
||||||
<method name="get_connected_host" qualifiers="const">
|
<method name="get_connected_host" qualifiers="const">
|
||||||
<return type="String">
|
<return type="String">
|
||||||
</return>
|
</return>
|
||||||
<description>
|
<description>
|
||||||
|
Return the IP of this peer.
|
||||||
</description>
|
</description>
|
||||||
</method>
|
</method>
|
||||||
<method name="get_connected_port" qualifiers="const">
|
<method name="get_connected_port" qualifiers="const">
|
||||||
<return type="int">
|
<return type="int">
|
||||||
</return>
|
</return>
|
||||||
<description>
|
<description>
|
||||||
|
Return the port of this peer.
|
||||||
</description>
|
</description>
|
||||||
</method>
|
</method>
|
||||||
<method name="disconnect">
|
<method name="disconnect">
|
||||||
<description>
|
<description>
|
||||||
|
Disconnect from host.
|
||||||
</description>
|
</description>
|
||||||
</method>
|
</method>
|
||||||
</methods>
|
</methods>
|
||||||
<constants>
|
<constants>
|
||||||
<constant name="STATUS_NONE" value="0">
|
<constant name="STATUS_NONE" value="0">
|
||||||
|
The initial status of the [StreamPeerTCP], also the status after a disconnect.
|
||||||
</constant>
|
</constant>
|
||||||
<constant name="STATUS_CONNECTING" value="1">
|
<constant name="STATUS_CONNECTING" value="1">
|
||||||
|
A status representing a [StreamPeerTCP] that is connecting to a host.
|
||||||
</constant>
|
</constant>
|
||||||
<constant name="STATUS_CONNECTED" value="2">
|
<constant name="STATUS_CONNECTED" value="2">
|
||||||
|
A status representing a [StreamPeerTCP] that is connected to a host.
|
||||||
</constant>
|
</constant>
|
||||||
<constant name="STATUS_ERROR" value="3">
|
<constant name="STATUS_ERROR" value="3">
|
||||||
|
A staus representing a [StreamPeerTCP] in error state.
|
||||||
</constant>
|
</constant>
|
||||||
</constants>
|
</constants>
|
||||||
</class>
|
</class>
|
||||||
|
|
Loading…
Reference in New Issue