blob: 103dbd771b831ff418af37f0289f0b7134e59e60 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
|
<?xml version="1.0" encoding="UTF-8" ?>
<class name="WebSocketMultiplayerPeer" inherits="NetworkedMultiplayerPeer" category="Core" version="3.2">
<brief_description>
Base class for WebSocket server and client.
</brief_description>
<description>
Base class for WebSocket server and client, allowing them to be used as network peer for the [MultiplayerAPI].
</description>
<tutorials>
</tutorials>
<methods>
<method name="get_peer" qualifiers="const">
<return type="WebSocketPeer">
</return>
<argument index="0" name="peer_id" type="int">
</argument>
<description>
Returns the [WebSocketPeer] associated to the given [code]peer_id[/code].
</description>
</method>
<method name="set_buffers">
<return type="int" enum="Error">
</return>
<argument index="0" name="input_buffer_size_kb" type="int">
</argument>
<argument index="1" name="input_max_packets" type="int">
</argument>
<argument index="2" name="output_buffer_size_kb" type="int">
</argument>
<argument index="3" name="output_max_packets" type="int">
</argument>
<description>
Configure the buffers sizes for this WebSocket peer. Default values can be specified in project settings under [code]network/limits[/code]. For server, values are meant per connected peer.
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.
NOTE: HTML5 exports only use the input buffer since the output one is managed by browsers.
</description>
</method>
</methods>
<signals>
<signal name="peer_packet">
<argument index="0" name="peer_source" type="int">
</argument>
<description>
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>
</signal>
</signals>
<constants>
</constants>
</class>
|