StreamPeerSSL.xml 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
  1. <?xml version="1.0" encoding="UTF-8" ?>
  2. <class name="StreamPeerSSL" inherits="StreamPeer" category="Core" version="3.1.2">
  3. <brief_description>
  4. SSL Stream peer.
  5. </brief_description>
  6. <description>
  7. SSL Stream peer. This object can be used to connect to SSL servers.
  8. </description>
  9. <tutorials>
  10. <link>https://docs.godotengine.org/en/3.1/tutorials/networking/ssl_certificates.html</link>
  11. </tutorials>
  12. <methods>
  13. <method name="accept_stream">
  14. <return type="int" enum="Error">
  15. </return>
  16. <argument index="0" name="base" type="StreamPeer">
  17. </argument>
  18. <description>
  19. </description>
  20. </method>
  21. <method name="connect_to_stream">
  22. <return type="int" enum="Error">
  23. </return>
  24. <argument index="0" name="stream" type="StreamPeer">
  25. </argument>
  26. <argument index="1" name="validate_certs" type="bool" default="false">
  27. </argument>
  28. <argument index="2" name="for_hostname" type="String" default="&quot;&quot;">
  29. </argument>
  30. <description>
  31. Connect to a peer using an underlying [StreamPeer] "stream", when "validate_certs" is [code]true[/code], [code]StreamPeerSSL[/code] will validate that the certificate presented by the peer matches the "for_hostname".
  32. </description>
  33. </method>
  34. <method name="disconnect_from_stream">
  35. <return type="void">
  36. </return>
  37. <description>
  38. Disconnect from host.
  39. </description>
  40. </method>
  41. <method name="get_status" qualifiers="const">
  42. <return type="int" enum="StreamPeerSSL.Status">
  43. </return>
  44. <description>
  45. Returns the status of the connection, one of STATUS_* enum.
  46. </description>
  47. </method>
  48. <method name="poll">
  49. <return type="void">
  50. </return>
  51. <description>
  52. Poll the connection to check for incoming bytes. Call this right before "get_available_bytes()" for it to work properly.
  53. </description>
  54. </method>
  55. </methods>
  56. <members>
  57. <member name="blocking_handshake" type="bool" setter="set_blocking_handshake_enabled" getter="is_blocking_handshake_enabled">
  58. </member>
  59. </members>
  60. <constants>
  61. <constant name="STATUS_DISCONNECTED" value="0" enum="Status">
  62. A status representing a [code]StreamPeerSSL[/code] that is disconnected.
  63. </constant>
  64. <constant name="STATUS_HANDSHAKING" value="1" enum="Status">
  65. </constant>
  66. <constant name="STATUS_CONNECTED" value="2" enum="Status">
  67. A status representing a [code]StreamPeerSSL[/code] that is connected to a host.
  68. </constant>
  69. <constant name="STATUS_ERROR" value="3" enum="Status">
  70. </constant>
  71. <constant name="STATUS_ERROR_HOSTNAME_MISMATCH" value="4" enum="Status">
  72. An error status that shows a mismatch in the SSL certificate domain presented by the host and the domain requested for validation.
  73. </constant>
  74. </constants>
  75. </class>