class_streampeerssl.rst 3.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  1. .. Generated automatically by doc/tools/makerst.py in Godot's source tree.
  2. .. DO NOT EDIT THIS FILE, but the doc/base/classes.xml source instead.
  3. .. _class_StreamPeerSSL:
  4. StreamPeerSSL
  5. =============
  6. **Inherits:** :ref:`StreamPeer<class_streampeer>` **<** :ref:`Reference<class_reference>` **<** :ref:`Object<class_object>`
  7. **Category:** Core
  8. Brief Description
  9. -----------------
  10. SSL Stream peer.
  11. Member Functions
  12. ----------------
  13. +------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  14. | Error | :ref:`accept<class_StreamPeerSSL_accept>` **(** :ref:`StreamPeer<class_streampeer>` stream **)** |
  15. +------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  16. | Error | :ref:`connect<class_StreamPeerSSL_connect>` **(** :ref:`StreamPeer<class_streampeer>` stream, :ref:`bool<class_bool>` validate_certs=false, :ref:`String<class_string>` for_hostname="" **)** |
  17. +------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  18. | void | :ref:`disconnect<class_StreamPeerSSL_disconnect>` **(** **)** |
  19. +------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  20. | :ref:`int<class_int>` | :ref:`get_status<class_StreamPeerSSL_get_status>` **(** **)** const |
  21. +------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  22. Numeric Constants
  23. -----------------
  24. - **STATUS_DISCONNECTED** = **0** --- A status representing a :ref:`StreamPeerSSL<class_streampeerssl>` that is disconnected.
  25. - **STATUS_CONNECTED** = **1** --- A status representing a :ref:`StreamPeerSSL<class_streampeerssl>` that is connected to a host.
  26. - **STATUS_ERROR_NO_CERTIFICATE** = **2** --- An errot status that shows the peer did not present a SSL certificate and validation was requested.
  27. - **STATUS_ERROR_HOSTNAME_MISMATCH** = **3** --- An error status that shows a mismatch in the SSL certificate domain presented by the host and the domain requested for validation.
  28. Description
  29. -----------
  30. SSL Stream peer. This object can be used to connect to SSL servers.
  31. Member Function Description
  32. ---------------------------
  33. .. _class_StreamPeerSSL_accept:
  34. - Error **accept** **(** :ref:`StreamPeer<class_streampeer>` stream **)**
  35. .. _class_StreamPeerSSL_connect:
  36. - Error **connect** **(** :ref:`StreamPeer<class_streampeer>` stream, :ref:`bool<class_bool>` validate_certs=false, :ref:`String<class_string>` for_hostname="" **)**
  37. Connect to a peer using an underlying :ref:`StreamPeer<class_streampeer>` "stream", when "validate_certs" is true, :ref:`StreamPeerSSL<class_streampeerssl>` will validate that the certificate presented by the peer matches the "for_hostname".
  38. .. _class_StreamPeerSSL_disconnect:
  39. - void **disconnect** **(** **)**
  40. Disconnect from host.
  41. .. _class_StreamPeerSSL_get_status:
  42. - :ref:`int<class_int>` **get_status** **(** **)** const
  43. Return the status of the connection, one of STATUS\_\* enum.