class_socketserver.rst 4.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105
  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/SocketServer.xml.
  6. .. _class_SocketServer:
  7. SocketServer
  8. ============
  9. **Inherits:** :ref:`RefCounted<class_RefCounted>` **<** :ref:`Object<class_Object>`
  10. **Inherited By:** :ref:`TCPServer<class_TCPServer>`, :ref:`UDSServer<class_UDSServer>`
  11. An abstract class for servers based on sockets.
  12. .. rst-class:: classref-introduction-group
  13. Description
  14. -----------
  15. A socket server.
  16. .. rst-class:: classref-reftable-group
  17. Methods
  18. -------
  19. .. table::
  20. :widths: auto
  21. +-------------------------------------------------+-------------------------------------------------------------------------------------------------+
  22. | :ref:`bool<class_bool>` | :ref:`is_connection_available<class_SocketServer_method_is_connection_available>`\ (\ ) |const| |
  23. +-------------------------------------------------+-------------------------------------------------------------------------------------------------+
  24. | :ref:`bool<class_bool>` | :ref:`is_listening<class_SocketServer_method_is_listening>`\ (\ ) |const| |
  25. +-------------------------------------------------+-------------------------------------------------------------------------------------------------+
  26. | |void| | :ref:`stop<class_SocketServer_method_stop>`\ (\ ) |
  27. +-------------------------------------------------+-------------------------------------------------------------------------------------------------+
  28. | :ref:`StreamPeerSocket<class_StreamPeerSocket>` | :ref:`take_socket_connection<class_SocketServer_method_take_socket_connection>`\ (\ ) |
  29. +-------------------------------------------------+-------------------------------------------------------------------------------------------------+
  30. .. rst-class:: classref-section-separator
  31. ----
  32. .. rst-class:: classref-descriptions-group
  33. Method Descriptions
  34. -------------------
  35. .. _class_SocketServer_method_is_connection_available:
  36. .. rst-class:: classref-method
  37. :ref:`bool<class_bool>` **is_connection_available**\ (\ ) |const| :ref:`🔗<class_SocketServer_method_is_connection_available>`
  38. Returns ``true`` if a connection is available for taking.
  39. .. rst-class:: classref-item-separator
  40. ----
  41. .. _class_SocketServer_method_is_listening:
  42. .. rst-class:: classref-method
  43. :ref:`bool<class_bool>` **is_listening**\ (\ ) |const| :ref:`🔗<class_SocketServer_method_is_listening>`
  44. Returns ``true`` if the server is currently listening for connections.
  45. .. rst-class:: classref-item-separator
  46. ----
  47. .. _class_SocketServer_method_stop:
  48. .. rst-class:: classref-method
  49. |void| **stop**\ (\ ) :ref:`🔗<class_SocketServer_method_stop>`
  50. Stops listening.
  51. .. rst-class:: classref-item-separator
  52. ----
  53. .. _class_SocketServer_method_take_socket_connection:
  54. .. rst-class:: classref-method
  55. :ref:`StreamPeerSocket<class_StreamPeerSocket>` **take_socket_connection**\ (\ ) :ref:`🔗<class_SocketServer_method_take_socket_connection>`
  56. If a connection is available, returns a StreamPeerSocket with the connection.
  57. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)`
  58. .. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)`
  59. .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)`
  60. .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)`
  61. .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)`
  62. .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)`
  63. .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)`
  64. .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)`
  65. .. |void| replace:: :abbr:`void (No return value.)`