StreamPeerSSL.xml 2.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  1. <?xml version="1.0" encoding="UTF-8" ?>
  2. <class name="StreamPeerSSL" inherits="StreamPeer" category="Core" version="3.0.alpha.custom_build">
  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. </tutorials>
  11. <demos>
  12. </demos>
  13. <methods>
  14. <method name="accept_stream">
  15. <return type="int" enum="Error">
  16. </return>
  17. <argument index="0" name="stream" type="StreamPeer">
  18. </argument>
  19. <description>
  20. </description>
  21. </method>
  22. <method name="connect_to_stream">
  23. <return type="int" enum="Error">
  24. </return>
  25. <argument index="0" name="stream" type="StreamPeer">
  26. </argument>
  27. <argument index="1" name="validate_certs" type="bool" default="false">
  28. </argument>
  29. <argument index="2" name="for_hostname" type="String" default="&quot;&quot;">
  30. </argument>
  31. <description>
  32. 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".
  33. </description>
  34. </method>
  35. <method name="disconnect_from_stream">
  36. <return type="void">
  37. </return>
  38. <description>
  39. Disconnect from host.
  40. </description>
  41. </method>
  42. <method name="get_status" qualifiers="const">
  43. <return type="int" enum="StreamPeerSSL.Status">
  44. </return>
  45. <description>
  46. Return the status of the connection, one of STATUS_* enum.
  47. </description>
  48. </method>
  49. </methods>
  50. <constants>
  51. <constant name="STATUS_DISCONNECTED" value="0">
  52. A status representing a [code]StreamPeerSSL[/code] that is disconnected.
  53. </constant>
  54. <constant name="STATUS_CONNECTED" value="1">
  55. A status representing a [code]StreamPeerSSL[/code] that is connected to a host.
  56. </constant>
  57. <constant name="STATUS_ERROR_NO_CERTIFICATE" value="2">
  58. An errot status that shows the peer did not present a SSL certificate and validation was requested.
  59. </constant>
  60. <constant name="STATUS_ERROR_HOSTNAME_MISMATCH" value="3">
  61. An error status that shows a mismatch in the SSL certificate domain presented by the host and the domain requested for validation.
  62. </constant>
  63. </constants>
  64. </class>