summaryrefslogtreecommitdiff
path: root/modules/enet/doc_classes/NetworkedMultiplayerENet.xml
blob: 25d17542ea45391bd92a205adba1c412e9a2da96 (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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
<?xml version="1.0" encoding="UTF-8" ?>
<class name="NetworkedMultiplayerENet" inherits="NetworkedMultiplayerPeer" category="Core" version="3.0-beta">
	<brief_description>
		PacketPeer implementation using the ENet library.
	</brief_description>
	<description>
		A connection (or a listening server) that should be passed to [method SceneTree.set_network_peer]. Socket events can be handled by connecting to [SceneTree] signals.
	</description>
	<tutorials>
	</tutorials>
	<demos>
	</demos>
	<methods>
		<method name="close_connection">
			<return type="void">
			</return>
			<description>
			</description>
		</method>
		<method name="create_client">
			<return type="int" enum="Error">
			</return>
			<argument index="0" name="ip" type="String">
			</argument>
			<argument index="1" name="port" type="int">
			</argument>
			<argument index="2" name="in_bandwidth" type="int" default="0">
			</argument>
			<argument index="3" name="out_bandwidth" type="int" default="0">
			</argument>
			<description>
				Create client that connects to a server at address [code]ip[/code] using specified [code]port[/code].
			</description>
		</method>
		<method name="create_server">
			<return type="int" enum="Error">
			</return>
			<argument index="0" name="port" type="int">
			</argument>
			<argument index="1" name="max_clients" type="int" default="32">
			</argument>
			<argument index="2" name="in_bandwidth" type="int" default="0">
			</argument>
			<argument index="3" name="out_bandwidth" type="int" default="0">
			</argument>
			<description>
				Create server that listens to connections via [code]port[/code].
			</description>
		</method>
		<method name="get_compression_mode" qualifiers="const">
			<return type="int" enum="NetworkedMultiplayerENet.CompressionMode">
			</return>
			<description>
			</description>
		</method>
		<method name="set_bind_ip">
			<return type="void">
			</return>
			<argument index="0" name="ip" type="String">
			</argument>
			<description>
			</description>
		</method>
		<method name="set_compression_mode">
			<return type="void">
			</return>
			<argument index="0" name="mode" type="int" enum="NetworkedMultiplayerENet.CompressionMode">
			</argument>
			<description>
			</description>
		</method>
	</methods>
	<constants>
		<constant name="COMPRESS_NONE" value="0" enum="CompressionMode">
		</constant>
		<constant name="COMPRESS_RANGE_CODER" value="1" enum="CompressionMode">
		</constant>
		<constant name="COMPRESS_FASTLZ" value="2" enum="CompressionMode">
		</constant>
		<constant name="COMPRESS_ZLIB" value="3" enum="CompressionMode">
		</constant>
		<constant name="COMPRESS_ZSTD" value="4" enum="CompressionMode">
		</constant>
	</constants>
</class>