[DOCS] MultiplayerNetworkPeer class/method/constant descs
This commit is contained in:
parent
9b9fcb1977
commit
a83574e4af
1 changed files with 23 additions and 7 deletions
|
@ -1,8 +1,10 @@
|
||||||
<?xml version="1.0" encoding="UTF-8" ?>
|
<?xml version="1.0" encoding="UTF-8" ?>
|
||||||
<class name="NetworkedMultiplayerPeer" inherits="PacketPeer" category="Core" version="3.0-beta">
|
<class name="NetworkedMultiplayerPeer" inherits="PacketPeer" category="Core" version="3.0-beta">
|
||||||
<brief_description>
|
<brief_description>
|
||||||
|
A high-level network interface to simplify multiplayer interactions.
|
||||||
</brief_description>
|
</brief_description>
|
||||||
<description>
|
<description>
|
||||||
|
Manages the connection to network peers. Assigns unique IDs to each client connected to the server.
|
||||||
</description>
|
</description>
|
||||||
<tutorials>
|
<tutorials>
|
||||||
</tutorials>
|
</tutorials>
|
||||||
|
@ -13,31 +15,35 @@
|
||||||
<return type="int" enum="NetworkedMultiplayerPeer.ConnectionStatus">
|
<return type="int" enum="NetworkedMultiplayerPeer.ConnectionStatus">
|
||||||
</return>
|
</return>
|
||||||
<description>
|
<description>
|
||||||
|
Returns the current state of the connection. See [enum ConnectionStatus].
|
||||||
</description>
|
</description>
|
||||||
</method>
|
</method>
|
||||||
<method name="get_packet_peer" qualifiers="const">
|
<method name="get_packet_peer" qualifiers="const">
|
||||||
<return type="int">
|
<return type="int">
|
||||||
</return>
|
</return>
|
||||||
<description>
|
<description>
|
||||||
|
Returns the ID of the [code]NetworkedMultiplayerPeer[/code] who sent the most recent packet.
|
||||||
</description>
|
</description>
|
||||||
</method>
|
</method>
|
||||||
<method name="get_unique_id" qualifiers="const">
|
<method name="get_unique_id" qualifiers="const">
|
||||||
<return type="int">
|
<return type="int">
|
||||||
</return>
|
</return>
|
||||||
<description>
|
<description>
|
||||||
|
Returns the ID of this [code]NetworkedMultiplayerPeer[/code].
|
||||||
</description>
|
</description>
|
||||||
</method>
|
</method>
|
||||||
<method name="is_refusing_new_connections" qualifiers="const">
|
<method name="is_refusing_new_connections" qualifiers="const">
|
||||||
<return type="bool">
|
<return type="bool">
|
||||||
</return>
|
</return>
|
||||||
<description>
|
<description>
|
||||||
Return whether this [code]NetworkedMultiplayerPeer[/code] is refusing new connections.
|
Returns [code]true[/code] if this [code]NetworkedMultiplayerPeer[/code] refuses new connections. Default value: [code]false[/code].
|
||||||
</description>
|
</description>
|
||||||
</method>
|
</method>
|
||||||
<method name="poll">
|
<method name="poll">
|
||||||
<return type="void">
|
<return type="void">
|
||||||
</return>
|
</return>
|
||||||
<description>
|
<description>
|
||||||
|
Waits up to 1 second to receive a new network event.
|
||||||
</description>
|
</description>
|
||||||
</method>
|
</method>
|
||||||
<method name="set_refuse_new_connections">
|
<method name="set_refuse_new_connections">
|
||||||
|
@ -46,7 +52,7 @@
|
||||||
<argument index="0" name="enable" type="bool">
|
<argument index="0" name="enable" type="bool">
|
||||||
</argument>
|
</argument>
|
||||||
<description>
|
<description>
|
||||||
If [code]endable[/code] is true, this [code]NetworkedMultiplayerPeer[/code] will refuse new connections.
|
If [code]true[/code] this [code]NetworkedMultiplayerPeer[/code] refuses new connections. Default value: [code]false[/code].
|
||||||
</description>
|
</description>
|
||||||
</method>
|
</method>
|
||||||
<method name="set_target_peer">
|
<method name="set_target_peer">
|
||||||
|
@ -55,6 +61,7 @@
|
||||||
<argument index="0" name="id" type="int">
|
<argument index="0" name="id" type="int">
|
||||||
</argument>
|
</argument>
|
||||||
<description>
|
<description>
|
||||||
|
The peer to which packets will be sent. Default value: [code]0[/code].
|
||||||
</description>
|
</description>
|
||||||
</method>
|
</method>
|
||||||
<method name="set_transfer_mode">
|
<method name="set_transfer_mode">
|
||||||
|
@ -63,56 +70,65 @@
|
||||||
<argument index="0" name="mode" type="int" enum="NetworkedMultiplayerPeer.TransferMode">
|
<argument index="0" name="mode" type="int" enum="NetworkedMultiplayerPeer.TransferMode">
|
||||||
</argument>
|
</argument>
|
||||||
<description>
|
<description>
|
||||||
|
The manner in which to send packets to the [code]target_peer[/code]. See [enum TransferMode].
|
||||||
</description>
|
</description>
|
||||||
</method>
|
</method>
|
||||||
</methods>
|
</methods>
|
||||||
<signals>
|
<signals>
|
||||||
<signal name="connection_failed">
|
<signal name="connection_failed">
|
||||||
<description>
|
<description>
|
||||||
Emitted when failed to connect to server.
|
Emitted when a connection attempt fails.
|
||||||
</description>
|
</description>
|
||||||
</signal>
|
</signal>
|
||||||
<signal name="connection_succeeded">
|
<signal name="connection_succeeded">
|
||||||
<description>
|
<description>
|
||||||
Emitted when successfully connected to server.
|
Emitted when a connection attempt succeeds.
|
||||||
</description>
|
</description>
|
||||||
</signal>
|
</signal>
|
||||||
<signal name="peer_connected">
|
<signal name="peer_connected">
|
||||||
<argument index="0" name="id" type="int">
|
<argument index="0" name="id" type="int">
|
||||||
</argument>
|
</argument>
|
||||||
<description>
|
<description>
|
||||||
Emitted by the server when a client is connected.
|
Emitted by the server when a client connects.
|
||||||
</description>
|
</description>
|
||||||
</signal>
|
</signal>
|
||||||
<signal name="peer_disconnected">
|
<signal name="peer_disconnected">
|
||||||
<argument index="0" name="id" type="int">
|
<argument index="0" name="id" type="int">
|
||||||
</argument>
|
</argument>
|
||||||
<description>
|
<description>
|
||||||
Emitted by the server when a client is disconnected.
|
Emitted by the server when a client disconnects.
|
||||||
</description>
|
</description>
|
||||||
</signal>
|
</signal>
|
||||||
<signal name="server_disconnected">
|
<signal name="server_disconnected">
|
||||||
<description>
|
<description>
|
||||||
Emitted by clients when server is disconnected.
|
Emitted by clients when the server disconnects.
|
||||||
</description>
|
</description>
|
||||||
</signal>
|
</signal>
|
||||||
</signals>
|
</signals>
|
||||||
<constants>
|
<constants>
|
||||||
<constant name="TRANSFER_MODE_UNRELIABLE" value="0" enum="TransferMode">
|
<constant name="TRANSFER_MODE_UNRELIABLE" value="0" enum="TransferMode">
|
||||||
|
Packets are sent via unordered UDP packets.
|
||||||
</constant>
|
</constant>
|
||||||
<constant name="TRANSFER_MODE_UNRELIABLE_ORDERED" value="1" enum="TransferMode">
|
<constant name="TRANSFER_MODE_UNRELIABLE_ORDERED" value="1" enum="TransferMode">
|
||||||
|
Packets are sent via ordered UDP packets.
|
||||||
</constant>
|
</constant>
|
||||||
<constant name="TRANSFER_MODE_RELIABLE" value="2" enum="TransferMode">
|
<constant name="TRANSFER_MODE_RELIABLE" value="2" enum="TransferMode">
|
||||||
|
Packets are sent via TCP packets.
|
||||||
</constant>
|
</constant>
|
||||||
<constant name="CONNECTION_DISCONNECTED" value="0" enum="ConnectionStatus">
|
<constant name="CONNECTION_DISCONNECTED" value="0" enum="ConnectionStatus">
|
||||||
|
The ongoing connection disconnected.
|
||||||
</constant>
|
</constant>
|
||||||
<constant name="CONNECTION_CONNECTING" value="1" enum="ConnectionStatus">
|
<constant name="CONNECTION_CONNECTING" value="1" enum="ConnectionStatus">
|
||||||
|
A connection attempt is ongoing.
|
||||||
</constant>
|
</constant>
|
||||||
<constant name="CONNECTION_CONNECTED" value="2" enum="ConnectionStatus">
|
<constant name="CONNECTION_CONNECTED" value="2" enum="ConnectionStatus">
|
||||||
|
The connection attempt succeeded.
|
||||||
</constant>
|
</constant>
|
||||||
<constant name="TARGET_PEER_BROADCAST" value="0">
|
<constant name="TARGET_PEER_BROADCAST" value="0">
|
||||||
|
Packets are sent to the server and then redistributed to other peers.
|
||||||
</constant>
|
</constant>
|
||||||
<constant name="TARGET_PEER_SERVER" value="1">
|
<constant name="TARGET_PEER_SERVER" value="1">
|
||||||
|
Packets are sent to the server alone.
|
||||||
</constant>
|
</constant>
|
||||||
</constants>
|
</constants>
|
||||||
</class>
|
</class>
|
||||||
|
|
Loading…
Reference in a new issue