2017-09-13 04:42:36 +08:00
<?xml version="1.0" encoding="UTF-8" ?>
2018-02-19 17:46:33 +08:00
<class name= "StreamPeerSSL" inherits= "StreamPeer" category= "Core" version= "3.1-dev" >
2017-09-13 04:42:36 +08:00
<brief_description >
SSL Stream peer.
</brief_description>
<description >
SSL Stream peer. This object can be used to connect to SSL servers.
</description>
<tutorials >
2018-01-25 16:03:59 +08:00
http://docs.godotengine.org/en/3.0/tutorials/networking/ssl_certificates.html
2017-09-13 04:42:36 +08:00
</tutorials>
<demos >
</demos>
<methods >
<method name= "accept_stream" >
<return type= "int" enum= "Error" >
</return>
<argument index= "0" name= "stream" type= "StreamPeer" >
</argument>
<description >
</description>
</method>
<method name= "connect_to_stream" >
<return type= "int" enum= "Error" >
</return>
<argument index= "0" name= "stream" type= "StreamPeer" >
</argument>
<argument index= "1" name= "validate_certs" type= "bool" default= "false" >
</argument>
<argument index= "2" name= "for_hostname" type= "String" default= """" >
</argument>
<description >
2017-10-22 18:56:11 +08:00
Connect to a peer using an underlying [StreamPeer] "stream", when "validate_certs" is true, [code]StreamPeerSSL[/code] will validate that the certificate presented by the peer matches the "for_hostname".
2017-09-13 04:42:36 +08:00
</description>
</method>
<method name= "disconnect_from_stream" >
<return type= "void" >
</return>
<description >
Disconnect from host.
</description>
</method>
<method name= "get_status" qualifiers= "const" >
<return type= "int" enum= "StreamPeerSSL.Status" >
</return>
<description >
Return the status of the connection, one of STATUS_* enum.
</description>
</method>
2018-02-09 22:03:34 +08:00
<method name= "poll" >
<return type= "void" >
</return>
<description >
Poll the connection to check for incoming bytes. Call this right before "get_available_bytes()" for it to work properly.
</description>
</method>
2017-09-13 04:42:36 +08:00
</methods>
<constants >
2017-11-25 06:16:30 +08:00
<constant name= "STATUS_DISCONNECTED" value= "0" enum= "Status" >
2017-10-22 18:56:11 +08:00
A status representing a [code]StreamPeerSSL[/code] that is disconnected.
2017-09-13 04:42:36 +08:00
</constant>
2017-11-25 06:16:30 +08:00
<constant name= "STATUS_CONNECTED" value= "1" enum= "Status" >
2017-10-22 18:56:11 +08:00
A status representing a [code]StreamPeerSSL[/code] that is connected to a host.
2017-09-13 04:42:36 +08:00
</constant>
2017-11-25 06:16:30 +08:00
<constant name= "STATUS_ERROR_NO_CERTIFICATE" value= "2" enum= "Status" >
2017-09-13 04:42:36 +08:00
An errot status that shows the peer did not present a SSL certificate and validation was requested.
</constant>
2017-11-25 06:16:30 +08:00
<constant name= "STATUS_ERROR_HOSTNAME_MISMATCH" value= "3" enum= "Status" >
2017-09-13 04:42:36 +08:00
An error status that shows a mismatch in the SSL certificate domain presented by the host and the domain requested for validation.
</constant>
</constants>
</class>