class_streampeersocket.rst 5.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138
  1. :github_url: hide
  2. .. DO NOT EDIT THIS FILE!!!
  3. .. Generated automatically from Godot engine sources.
  4. .. Generator: https://github.com/godotengine/godot/tree/master/doc/tools/make_rst.py.
  5. .. XML source: https://github.com/godotengine/godot/tree/master/doc/classes/StreamPeerSocket.xml.
  6. .. _class_StreamPeerSocket:
  7. StreamPeerSocket
  8. ================
  9. **Inherits:** :ref:`StreamPeer<class_StreamPeer>` **<** :ref:`RefCounted<class_RefCounted>` **<** :ref:`Object<class_Object>`
  10. **Inherited By:** :ref:`StreamPeerTCP<class_StreamPeerTCP>`, :ref:`StreamPeerUDS<class_StreamPeerUDS>`
  11. Abstract base class for interacting with socket streams.
  12. .. rst-class:: classref-introduction-group
  13. Description
  14. -----------
  15. StreamPeerSocket is an abstract base class that defines common behavior for socket-based streams.
  16. .. rst-class:: classref-reftable-group
  17. Methods
  18. -------
  19. .. table::
  20. :widths: auto
  21. +---------------------------------------------+---------------------------------------------------------------------------------------+
  22. | |void| | :ref:`disconnect_from_host<class_StreamPeerSocket_method_disconnect_from_host>`\ (\ ) |
  23. +---------------------------------------------+---------------------------------------------------------------------------------------+
  24. | :ref:`Status<enum_StreamPeerSocket_Status>` | :ref:`get_status<class_StreamPeerSocket_method_get_status>`\ (\ ) |const| |
  25. +---------------------------------------------+---------------------------------------------------------------------------------------+
  26. | :ref:`Error<enum_@GlobalScope_Error>` | :ref:`poll<class_StreamPeerSocket_method_poll>`\ (\ ) |
  27. +---------------------------------------------+---------------------------------------------------------------------------------------+
  28. .. rst-class:: classref-section-separator
  29. ----
  30. .. rst-class:: classref-descriptions-group
  31. Enumerations
  32. ------------
  33. .. _enum_StreamPeerSocket_Status:
  34. .. rst-class:: classref-enumeration
  35. enum **Status**: :ref:`🔗<enum_StreamPeerSocket_Status>`
  36. .. _class_StreamPeerSocket_constant_STATUS_NONE:
  37. .. rst-class:: classref-enumeration-constant
  38. :ref:`Status<enum_StreamPeerSocket_Status>` **STATUS_NONE** = ``0``
  39. The initial status of the **StreamPeerSocket**. This is also the status after disconnecting.
  40. .. _class_StreamPeerSocket_constant_STATUS_CONNECTING:
  41. .. rst-class:: classref-enumeration-constant
  42. :ref:`Status<enum_StreamPeerSocket_Status>` **STATUS_CONNECTING** = ``1``
  43. A status representing a **StreamPeerSocket** that is connecting to a host.
  44. .. _class_StreamPeerSocket_constant_STATUS_CONNECTED:
  45. .. rst-class:: classref-enumeration-constant
  46. :ref:`Status<enum_StreamPeerSocket_Status>` **STATUS_CONNECTED** = ``2``
  47. A status representing a **StreamPeerSocket** that is connected to a host.
  48. .. _class_StreamPeerSocket_constant_STATUS_ERROR:
  49. .. rst-class:: classref-enumeration-constant
  50. :ref:`Status<enum_StreamPeerSocket_Status>` **STATUS_ERROR** = ``3``
  51. A status representing a **StreamPeerSocket** in error state.
  52. .. rst-class:: classref-section-separator
  53. ----
  54. .. rst-class:: classref-descriptions-group
  55. Method Descriptions
  56. -------------------
  57. .. _class_StreamPeerSocket_method_disconnect_from_host:
  58. .. rst-class:: classref-method
  59. |void| **disconnect_from_host**\ (\ ) :ref:`🔗<class_StreamPeerSocket_method_disconnect_from_host>`
  60. Disconnects from host.
  61. .. rst-class:: classref-item-separator
  62. ----
  63. .. _class_StreamPeerSocket_method_get_status:
  64. .. rst-class:: classref-method
  65. :ref:`Status<enum_StreamPeerSocket_Status>` **get_status**\ (\ ) |const| :ref:`🔗<class_StreamPeerSocket_method_get_status>`
  66. Returns the status of the connection.
  67. .. rst-class:: classref-item-separator
  68. ----
  69. .. _class_StreamPeerSocket_method_poll:
  70. .. rst-class:: classref-method
  71. :ref:`Error<enum_@GlobalScope_Error>` **poll**\ (\ ) :ref:`🔗<class_StreamPeerSocket_method_poll>`
  72. Polls the socket, updating its state. See :ref:`get_status()<class_StreamPeerSocket_method_get_status>`.
  73. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)`
  74. .. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)`
  75. .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)`
  76. .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)`
  77. .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)`
  78. .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)`
  79. .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)`
  80. .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)`
  81. .. |void| replace:: :abbr:`void (No return value.)`