2018-02-19 09:47:16 +00:00
<?xml version="1.0" encoding="UTF-8" ?>
2022-03-16 22:01:02 +00:00
<class name= "WebSocketMultiplayerPeer" inherits= "NetworkedMultiplayerPeer" version= "3.5" xmlns:xsi= "http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation= "../../../doc/class.xsd" >
2018-02-19 09:47:16 +00:00
<brief_description >
2018-05-08 12:40:08 +00:00
Base class for WebSocket server and client.
2018-02-19 09:47:16 +00:00
</brief_description>
<description >
2018-05-08 12:40:08 +00:00
Base class for WebSocket server and client, allowing them to be used as network peer for the [MultiplayerAPI].
2018-02-19 09:47:16 +00:00
</description>
<tutorials >
</tutorials>
<methods >
<method name= "get_peer" qualifiers= "const" >
2021-07-30 13:28:05 +00:00
<return type= "WebSocketPeer" />
<argument index= "0" name= "peer_id" type= "int" />
2018-02-19 09:47:16 +00:00
<description >
2018-05-08 12:40:08 +00:00
Returns the [WebSocketPeer] associated to the given [code]peer_id[/code].
2018-02-19 09:47:16 +00:00
</description>
</method>
2019-06-15 15:13:26 +00:00
<method name= "set_buffers" >
2021-07-30 13:28:05 +00:00
<return type= "int" enum= "Error" />
<argument index= "0" name= "input_buffer_size_kb" type= "int" />
<argument index= "1" name= "input_max_packets" type= "int" />
<argument index= "2" name= "output_buffer_size_kb" type= "int" />
<argument index= "3" name= "output_max_packets" type= "int" />
2019-06-15 15:13:26 +00:00
<description >
2019-06-21 23:04:47 +00:00
Configures the buffer sizes for this WebSocket peer. Default values can be specified in the Project Settings under [code]network/limits[/code]. For server, values are meant per connected peer.
2019-06-15 15:13:26 +00:00
The first two parameters define the size and queued packets limits of the input buffer, the last two of the output buffer.
Buffer sizes are expressed in KiB, so [code]4 = 2^12 = 4096 bytes[/code]. All parameters will be rounded up to the nearest power of two.
2019-06-21 23:04:47 +00:00
[b]Note:[/b] HTML5 exports only use the input buffer since the output one is managed by browsers.
2019-06-15 15:13:26 +00:00
</description>
</method>
2018-02-19 09:47:16 +00:00
</methods>
2019-09-03 10:44:58 +00:00
<members >
2021-12-02 20:15:17 +00:00
<member name= "refuse_new_connections" type= "bool" setter= "set_refuse_new_connections" getter= "is_refusing_new_connections" overrides= "NetworkedMultiplayerPeer" default= "false" />
<member name= "transfer_mode" type= "int" setter= "set_transfer_mode" getter= "get_transfer_mode" overrides= "NetworkedMultiplayerPeer" enum= "NetworkedMultiplayerPeer.TransferMode" default= "2" />
2019-09-03 10:44:58 +00:00
</members>
2018-02-19 09:47:16 +00:00
<signals >
<signal name= "peer_packet" >
2021-07-30 13:28:05 +00:00
<argument index= "0" name= "peer_source" type= "int" />
2018-02-19 09:47:16 +00:00
<description >
2019-06-21 23:04:47 +00:00
Emitted when a packet is received from a peer.
[b]Note:[/b] This signal is only emitted when the client or server is configured to use Godot multiplayer API.
2018-02-19 09:47:16 +00:00
</description>
</signal>
</signals>
<constants >
</constants>
</class>