:github_url: hide .. Generated automatically by doc/tools/makerst.py in Godot's source tree. .. DO NOT EDIT THIS FILE, but the WebSocketMultiplayerPeer.xml source instead. .. The source is found in doc/classes or modules//doc_classes. .. _class_WebSocketMultiplayerPeer: WebSocketMultiplayerPeer ======================== **Inherits:** :ref:`NetworkedMultiplayerPeer` **<** :ref:`PacketPeer` **<** :ref:`Reference` **<** :ref:`Object` **Inherited By:** :ref:`WebSocketClient`, :ref:`WebSocketServer` **Category:** Core Brief Description ----------------- Base class for WebSocket server and client. Methods ------- +-------------------------------------------+-----------------------------------------------------------------------------------------------------------------+ | :ref:`WebSocketPeer` | :ref:`get_peer` **(** :ref:`int` peer_id **)** const | +-------------------------------------------+-----------------------------------------------------------------------------------------------------------------+ Signals ------- .. _class_WebSocketMultiplayerPeer_signal_peer_packet: - **peer_packet** **(** :ref:`int` peer_source **)** Emitted when a packet is received from a peer. Note: this signal is only emitted when the client or server is configured to use Godot multiplayer API. Description ----------- Base class for WebSocket server and client, allowing them to be used as network peer for the :ref:`MultiplayerAPI`. Method Descriptions ------------------- .. _class_WebSocketMultiplayerPeer_method_get_peer: - :ref:`WebSocketPeer` **get_peer** **(** :ref:`int` peer_id **)** const Returns the :ref:`WebSocketPeer` associated to the given ``peer_id``.