class_networkedmultiplayerenet.rst 5.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576
  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_NetworkedMultiplayerENet:
  4. NetworkedMultiplayerENet
  5. ========================
  6. **Inherits:** :ref:`NetworkedMultiplayerPeer<class_networkedmultiplayerpeer>` **<** :ref:`PacketPeer<class_packetpeer>` **<** :ref:`Reference<class_reference>` **<** :ref:`Object<class_object>`
  7. **Category:** Core
  8. Brief Description
  9. -----------------
  10. PacketPeer implementation using the ENet library.
  11. Member Functions
  12. ----------------
  13. +------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  14. | void | :ref:`close_connection<class_NetworkedMultiplayerENet_close_connection>` **(** **)** |
  15. +------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  16. | :ref:`int<class_int>` | :ref:`create_client<class_NetworkedMultiplayerENet_create_client>` **(** :ref:`String<class_string>` ip, :ref:`int<class_int>` port, :ref:`int<class_int>` in_bandwidth=0, :ref:`int<class_int>` out_bandwidth=0 **)** |
  17. +------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  18. | :ref:`int<class_int>` | :ref:`create_server<class_NetworkedMultiplayerENet_create_server>` **(** :ref:`int<class_int>` port, :ref:`int<class_int>` max_clients=32, :ref:`int<class_int>` in_bandwidth=0, :ref:`int<class_int>` out_bandwidth=0 **)** |
  19. +------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  20. | :ref:`int<class_int>` | :ref:`get_compression_mode<class_NetworkedMultiplayerENet_get_compression_mode>` **(** **)** const |
  21. +------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  22. | void | :ref:`set_bind_ip<class_NetworkedMultiplayerENet_set_bind_ip>` **(** :ref:`String<class_string>` ip **)** |
  23. +------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  24. | void | :ref:`set_compression_mode<class_NetworkedMultiplayerENet_set_compression_mode>` **(** :ref:`int<class_int>` mode **)** |
  25. +------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  26. Numeric Constants
  27. -----------------
  28. - **COMPRESS_NONE** = **0**
  29. - **COMPRESS_RANGE_CODER** = **1**
  30. - **COMPRESS_FASTLZ** = **2**
  31. - **COMPRESS_ZLIB** = **3**
  32. - **COMPRESS_ZSTD** = **4**
  33. Description
  34. -----------
  35. A connection (or a listening server) that should be passed to :ref:`SceneTree.set_network_peer<class_SceneTree_set_network_peer>`. Socket events can be handled by connecting to :ref:`SceneTree<class_scenetree>` signals.
  36. Member Function Description
  37. ---------------------------
  38. .. _class_NetworkedMultiplayerENet_close_connection:
  39. - void **close_connection** **(** **)**
  40. .. _class_NetworkedMultiplayerENet_create_client:
  41. - :ref:`int<class_int>` **create_client** **(** :ref:`String<class_string>` ip, :ref:`int<class_int>` port, :ref:`int<class_int>` in_bandwidth=0, :ref:`int<class_int>` out_bandwidth=0 **)**
  42. .. _class_NetworkedMultiplayerENet_create_server:
  43. - :ref:`int<class_int>` **create_server** **(** :ref:`int<class_int>` port, :ref:`int<class_int>` max_clients=32, :ref:`int<class_int>` in_bandwidth=0, :ref:`int<class_int>` out_bandwidth=0 **)**
  44. .. _class_NetworkedMultiplayerENet_get_compression_mode:
  45. - :ref:`int<class_int>` **get_compression_mode** **(** **)** const
  46. .. _class_NetworkedMultiplayerENet_set_bind_ip:
  47. - void **set_bind_ip** **(** :ref:`String<class_string>` ip **)**
  48. .. _class_NetworkedMultiplayerENet_set_compression_mode:
  49. - void **set_compression_mode** **(** :ref:`int<class_int>` mode **)**