mirror of
https://github.com/godotengine/godot-docs.git
synced 2026-01-05 22:09:56 +03:00
doc: Sync with current 3.5 branch (8ee69a88c)
This commit is contained in:
@@ -20,7 +20,7 @@ This class implements a WebSocket server that can also support the high-level mu
|
||||
|
||||
After starting the server (:ref:`listen<class_WebSocketServer_method_listen>`), you will need to :ref:`NetworkedMultiplayerPeer.poll<class_NetworkedMultiplayerPeer_method_poll>` it at regular intervals (e.g. inside :ref:`Node._process<class_Node_method__process>`). When clients connect, disconnect, or send data, you will receive the appropriate signal.
|
||||
|
||||
**Note:** Not available in HTML5 exports.
|
||||
\ **Note:** Not available in HTML5 exports.
|
||||
|
||||
Properties
|
||||
----------
|
||||
@@ -53,6 +53,8 @@ Methods
|
||||
+---------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`Error<enum_@GlobalScope_Error>` | :ref:`listen<class_WebSocketServer_method_listen>` **(** :ref:`int<class_int>` port, :ref:`PoolStringArray<class_PoolStringArray>` protocols=PoolStringArray( ), :ref:`bool<class_bool>` gd_mp_api=false **)** |
|
||||
+---------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`set_extra_headers<class_WebSocketServer_method_set_extra_headers>` **(** :ref:`PoolStringArray<class_PoolStringArray>` headers=PoolStringArray( ) **)** |
|
||||
+---------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`stop<class_WebSocketServer_method_stop>` **(** **)** |
|
||||
+---------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
|
||||
@@ -89,7 +91,7 @@ Emitted when a client disconnects. ``was_clean_close`` will be ``true`` if the c
|
||||
|
||||
Emitted when a new message is received.
|
||||
|
||||
**Note:** This signal is *not* emitted when used as high-level multiplayer peer.
|
||||
\ **Note:** This signal is *not* emitted when used as high-level multiplayer peer.
|
||||
|
||||
Property Descriptions
|
||||
---------------------
|
||||
@@ -223,6 +225,14 @@ If ``false`` is passed instead (default), you must call :ref:`PacketPeer<class_P
|
||||
|
||||
----
|
||||
|
||||
.. _class_WebSocketServer_method_set_extra_headers:
|
||||
|
||||
- void **set_extra_headers** **(** :ref:`PoolStringArray<class_PoolStringArray>` headers=PoolStringArray( ) **)**
|
||||
|
||||
Sets additional headers to be sent to clients during the HTTP handshake.
|
||||
|
||||
----
|
||||
|
||||
.. _class_WebSocketServer_method_stop:
|
||||
|
||||
- void **stop** **(** **)**
|
||||
|
||||
Reference in New Issue
Block a user