StreamPeerSSL.xml 2.7 KB

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