.. DO NOT EDIT THIS FILE!!! .. Generated automatically from Godot engine sources. .. Generator: https://github.com/godotengine/godot/tree/master/doc/tools/make_rst.py. .. XML source: https://github.com/godotengine/godot/tree/master/docs/gdscript/modules/websocket/doc_classes/WebSocketPeer.xml. .. _class_WebSocketPeer: WebSocketPeer ============= **Inherits:** :ref:`PacketPeer` **<** :ref:`RefCounted` **<** :ref:`Object` .. container:: contribute There is currently no description for this class. Please help us by :ref:`contributing one `! .. rst-class:: classref-reftable-group Properties ---------- .. table:: :widths: auto +---------------------------------------------------+--------------------------------------------------------------------------------+-------------------------+ | :ref:`PackedStringArray` | :ref:`handshake_headers` | ``PackedStringArray()`` | +---------------------------------------------------+--------------------------------------------------------------------------------+-------------------------+ | :ref:`int` | :ref:`inbound_buffer_size` | ``65535`` | +---------------------------------------------------+--------------------------------------------------------------------------------+-------------------------+ | :ref:`int` | :ref:`max_queued_packets` | ``2048`` | +---------------------------------------------------+--------------------------------------------------------------------------------+-------------------------+ | :ref:`int` | :ref:`outbound_buffer_size` | ``65535`` | +---------------------------------------------------+--------------------------------------------------------------------------------+-------------------------+ | :ref:`PackedStringArray` | :ref:`supported_protocols` | ``PackedStringArray()`` | +---------------------------------------------------+--------------------------------------------------------------------------------+-------------------------+ .. rst-class:: classref-reftable-group Methods ------- .. table:: :widths: auto +----------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Error` | :ref:`accept_stream` **(** :ref:`StreamPeer` stream **)** | +----------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`close` **(** :ref:`int` code=1000, :ref:`String` reason="" **)** | +----------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Error` | :ref:`connect_to_url` **(** :ref:`String` url, :ref:`TLSOptions` tls_client_options=null **)** | +----------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`get_close_code` **(** **)** |const| | +----------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`String` | :ref:`get_close_reason` **(** **)** |const| | +----------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`String` | :ref:`get_connected_host` **(** **)** |const| | +----------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`get_connected_port` **(** **)** |const| | +----------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`get_current_outbound_buffered_amount` **(** **)** |const| | +----------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`State` | :ref:`get_ready_state` **(** **)** |const| | +----------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`String` | :ref:`get_requested_url` **(** **)** |const| | +----------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`String` | :ref:`get_selected_protocol` **(** **)** |const| | +----------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`poll` **(** **)** | +----------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Error` | :ref:`send` **(** :ref:`PackedByteArray` message, :ref:`WriteMode` write_mode=1 **)** | +----------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Error` | :ref:`send_text` **(** :ref:`String` message **)** | +----------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`set_no_delay` **(** :ref:`bool` enabled **)** | +----------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`was_string_packet` **(** **)** |const| | +----------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator ---- .. rst-class:: classref-descriptions-group Enumerations ------------ .. _enum_WebSocketPeer_WriteMode: .. rst-class:: classref-enumeration enum **WriteMode**: .. _class_WebSocketPeer_constant_WRITE_MODE_TEXT: .. rst-class:: classref-enumeration-constant :ref:`WriteMode` **WRITE_MODE_TEXT** = ``0`` .. container:: contribute There is currently no description for this enum. Please help us by :ref:`contributing one `! .. _class_WebSocketPeer_constant_WRITE_MODE_BINARY: .. rst-class:: classref-enumeration-constant :ref:`WriteMode` **WRITE_MODE_BINARY** = ``1`` .. container:: contribute There is currently no description for this enum. Please help us by :ref:`contributing one `! .. rst-class:: classref-item-separator ---- .. _enum_WebSocketPeer_State: .. rst-class:: classref-enumeration enum **State**: .. _class_WebSocketPeer_constant_STATE_CONNECTING: .. rst-class:: classref-enumeration-constant :ref:`State` **STATE_CONNECTING** = ``0`` .. container:: contribute There is currently no description for this enum. Please help us by :ref:`contributing one `! .. _class_WebSocketPeer_constant_STATE_OPEN: .. rst-class:: classref-enumeration-constant :ref:`State` **STATE_OPEN** = ``1`` .. container:: contribute There is currently no description for this enum. Please help us by :ref:`contributing one `! .. _class_WebSocketPeer_constant_STATE_CLOSING: .. rst-class:: classref-enumeration-constant :ref:`State` **STATE_CLOSING** = ``2`` .. container:: contribute There is currently no description for this enum. Please help us by :ref:`contributing one `! .. _class_WebSocketPeer_constant_STATE_CLOSED: .. rst-class:: classref-enumeration-constant :ref:`State` **STATE_CLOSED** = ``3`` .. container:: contribute There is currently no description for this enum. Please help us by :ref:`contributing one `! .. rst-class:: classref-section-separator ---- .. rst-class:: classref-descriptions-group Property Descriptions --------------------- .. _class_WebSocketPeer_property_handshake_headers: .. rst-class:: classref-property :ref:`PackedStringArray` **handshake_headers** = ``PackedStringArray()`` .. rst-class:: classref-property-setget - void **set_handshake_headers** **(** :ref:`PackedStringArray` value **)** - :ref:`PackedStringArray` **get_handshake_headers** **(** **)** .. container:: contribute There is currently no description for this property. Please help us by :ref:`contributing one `! .. rst-class:: classref-item-separator ---- .. _class_WebSocketPeer_property_inbound_buffer_size: .. rst-class:: classref-property :ref:`int` **inbound_buffer_size** = ``65535`` .. rst-class:: classref-property-setget - void **set_inbound_buffer_size** **(** :ref:`int` value **)** - :ref:`int` **get_inbound_buffer_size** **(** **)** .. container:: contribute There is currently no description for this property. Please help us by :ref:`contributing one `! .. rst-class:: classref-item-separator ---- .. _class_WebSocketPeer_property_max_queued_packets: .. rst-class:: classref-property :ref:`int` **max_queued_packets** = ``2048`` .. rst-class:: classref-property-setget - void **set_max_queued_packets** **(** :ref:`int` value **)** - :ref:`int` **get_max_queued_packets** **(** **)** .. container:: contribute There is currently no description for this property. Please help us by :ref:`contributing one `! .. rst-class:: classref-item-separator ---- .. _class_WebSocketPeer_property_outbound_buffer_size: .. rst-class:: classref-property :ref:`int` **outbound_buffer_size** = ``65535`` .. rst-class:: classref-property-setget - void **set_outbound_buffer_size** **(** :ref:`int` value **)** - :ref:`int` **get_outbound_buffer_size** **(** **)** .. container:: contribute There is currently no description for this property. Please help us by :ref:`contributing one `! .. rst-class:: classref-item-separator ---- .. _class_WebSocketPeer_property_supported_protocols: .. rst-class:: classref-property :ref:`PackedStringArray` **supported_protocols** = ``PackedStringArray()`` .. rst-class:: classref-property-setget - void **set_supported_protocols** **(** :ref:`PackedStringArray` value **)** - :ref:`PackedStringArray` **get_supported_protocols** **(** **)** .. container:: contribute There is currently no description for this property. Please help us by :ref:`contributing one `! .. rst-class:: classref-section-separator ---- .. rst-class:: classref-descriptions-group Method Descriptions ------------------- .. _class_WebSocketPeer_method_accept_stream: .. rst-class:: classref-method :ref:`Error` **accept_stream** **(** :ref:`StreamPeer` stream **)** .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! .. rst-class:: classref-item-separator ---- .. _class_WebSocketPeer_method_close: .. rst-class:: classref-method void **close** **(** :ref:`int` code=1000, :ref:`String` reason="" **)** .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! .. rst-class:: classref-item-separator ---- .. _class_WebSocketPeer_method_connect_to_url: .. rst-class:: classref-method :ref:`Error` **connect_to_url** **(** :ref:`String` url, :ref:`TLSOptions` tls_client_options=null **)** .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! .. rst-class:: classref-item-separator ---- .. _class_WebSocketPeer_method_get_close_code: .. rst-class:: classref-method :ref:`int` **get_close_code** **(** **)** |const| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! .. rst-class:: classref-item-separator ---- .. _class_WebSocketPeer_method_get_close_reason: .. rst-class:: classref-method :ref:`String` **get_close_reason** **(** **)** |const| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! .. rst-class:: classref-item-separator ---- .. _class_WebSocketPeer_method_get_connected_host: .. rst-class:: classref-method :ref:`String` **get_connected_host** **(** **)** |const| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! .. rst-class:: classref-item-separator ---- .. _class_WebSocketPeer_method_get_connected_port: .. rst-class:: classref-method :ref:`int` **get_connected_port** **(** **)** |const| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! .. rst-class:: classref-item-separator ---- .. _class_WebSocketPeer_method_get_current_outbound_buffered_amount: .. rst-class:: classref-method :ref:`int` **get_current_outbound_buffered_amount** **(** **)** |const| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! .. rst-class:: classref-item-separator ---- .. _class_WebSocketPeer_method_get_ready_state: .. rst-class:: classref-method :ref:`State` **get_ready_state** **(** **)** |const| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! .. rst-class:: classref-item-separator ---- .. _class_WebSocketPeer_method_get_requested_url: .. rst-class:: classref-method :ref:`String` **get_requested_url** **(** **)** |const| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! .. rst-class:: classref-item-separator ---- .. _class_WebSocketPeer_method_get_selected_protocol: .. rst-class:: classref-method :ref:`String` **get_selected_protocol** **(** **)** |const| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! .. rst-class:: classref-item-separator ---- .. _class_WebSocketPeer_method_poll: .. rst-class:: classref-method void **poll** **(** **)** .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! .. rst-class:: classref-item-separator ---- .. _class_WebSocketPeer_method_send: .. rst-class:: classref-method :ref:`Error` **send** **(** :ref:`PackedByteArray` message, :ref:`WriteMode` write_mode=1 **)** .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! .. rst-class:: classref-item-separator ---- .. _class_WebSocketPeer_method_send_text: .. rst-class:: classref-method :ref:`Error` **send_text** **(** :ref:`String` message **)** .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! .. rst-class:: classref-item-separator ---- .. _class_WebSocketPeer_method_set_no_delay: .. rst-class:: classref-method void **set_no_delay** **(** :ref:`bool` enabled **)** .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! .. rst-class:: classref-item-separator ---- .. _class_WebSocketPeer_method_was_string_packet: .. rst-class:: classref-method :ref:`bool` **was_string_packet** **(** **)** |const| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)`