class_packetpeerstream.rst 4.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182
  1. :github_url: hide
  2. .. Generated automatically by doc/tools/make_rst.py in Godot's source tree.
  3. .. DO NOT EDIT THIS FILE, but the PacketPeerStream.xml source instead.
  4. .. The source is found in doc/classes or modules/<name>/doc_classes.
  5. .. _class_PacketPeerStream:
  6. PacketPeerStream
  7. ================
  8. **Inherits:** :ref:`PacketPeer<class_PacketPeer>` **<** :ref:`RefCounted<class_RefCounted>` **<** :ref:`Object<class_Object>`
  9. Wrapper to use a PacketPeer over a StreamPeer.
  10. Description
  11. -----------
  12. PacketStreamPeer provides a wrapper for working using packets over a stream. This allows for using packet based code with StreamPeers. PacketPeerStream implements a custom protocol over the StreamPeer, so the user should not read or write to the wrapped StreamPeer directly.
  13. \ **Note:** When exporting to Android, make sure to enable the ``INTERNET`` permission in the Android export preset before exporting the project or using one-click deploy. Otherwise, network communication of any kind will be blocked by Android.
  14. Properties
  15. ----------
  16. +-------------------------------------+---------------------------------------------------------------------------------------+-----------+
  17. | :ref:`int<class_int>` | :ref:`input_buffer_max_size<class_PacketPeerStream_property_input_buffer_max_size>` | ``65532`` |
  18. +-------------------------------------+---------------------------------------------------------------------------------------+-----------+
  19. | :ref:`int<class_int>` | :ref:`output_buffer_max_size<class_PacketPeerStream_property_output_buffer_max_size>` | ``65532`` |
  20. +-------------------------------------+---------------------------------------------------------------------------------------+-----------+
  21. | :ref:`StreamPeer<class_StreamPeer>` | :ref:`stream_peer<class_PacketPeerStream_property_stream_peer>` | |
  22. +-------------------------------------+---------------------------------------------------------------------------------------+-----------+
  23. Property Descriptions
  24. ---------------------
  25. .. _class_PacketPeerStream_property_input_buffer_max_size:
  26. - :ref:`int<class_int>` **input_buffer_max_size**
  27. +-----------+----------------------------------+
  28. | *Default* | ``65532`` |
  29. +-----------+----------------------------------+
  30. | *Setter* | set_input_buffer_max_size(value) |
  31. +-----------+----------------------------------+
  32. | *Getter* | get_input_buffer_max_size() |
  33. +-----------+----------------------------------+
  34. ----
  35. .. _class_PacketPeerStream_property_output_buffer_max_size:
  36. - :ref:`int<class_int>` **output_buffer_max_size**
  37. +-----------+-----------------------------------+
  38. | *Default* | ``65532`` |
  39. +-----------+-----------------------------------+
  40. | *Setter* | set_output_buffer_max_size(value) |
  41. +-----------+-----------------------------------+
  42. | *Getter* | get_output_buffer_max_size() |
  43. +-----------+-----------------------------------+
  44. ----
  45. .. _class_PacketPeerStream_property_stream_peer:
  46. - :ref:`StreamPeer<class_StreamPeer>` **stream_peer**
  47. +----------+------------------------+
  48. | *Setter* | set_stream_peer(value) |
  49. +----------+------------------------+
  50. | *Getter* | get_stream_peer() |
  51. +----------+------------------------+
  52. The wrapped :ref:`StreamPeer<class_StreamPeer>` object.
  53. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)`
  54. .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)`
  55. .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)`
  56. .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)`
  57. .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)`
  58. .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)`