mirror of
https://github.com/godotengine/godot.git
synced 2024-12-03 17:42:12 +00:00
f7f6115f76
- Document a few more properties and methods - Add more information to many classes - Fix lots of typos and gramar mistakes - Use [code] tags for parameters consistently - Use [b] and [i] tags consistently - Put "Warning:" and "Note:" on their own line to be more visible, and make them always bold - Tweak formatting in code examples to be more readable - Use double quotes consistently - Add more links to third-party technologies
51 lines
1.8 KiB
XML
51 lines
1.8 KiB
XML
<?xml version="1.0" encoding="UTF-8" ?>
|
|
<class name="TCP_Server" inherits="Reference" category="Core" version="3.2">
|
|
<brief_description>
|
|
A TCP server.
|
|
</brief_description>
|
|
<description>
|
|
A TCP server. Listens to connections on a port and returns a [StreamPeerTCP] when it gets an incoming connection.
|
|
</description>
|
|
<tutorials>
|
|
</tutorials>
|
|
<methods>
|
|
<method name="is_connection_available" qualifiers="const">
|
|
<return type="bool">
|
|
</return>
|
|
<description>
|
|
Returns [code]true[/code] if a connection is available for taking.
|
|
</description>
|
|
</method>
|
|
<method name="listen">
|
|
<return type="int" enum="Error">
|
|
</return>
|
|
<argument index="0" name="port" type="int">
|
|
</argument>
|
|
<argument index="1" name="bind_address" type="String" default=""*"">
|
|
</argument>
|
|
<description>
|
|
Listen on the [code]port[/code] binding to [code]bind_address[/code].
|
|
If [code]bind_address[/code] is set as [code]"*"[/code] (default), the server will listen on all available addresses (both IPv4 and IPv6).
|
|
If [code]bind_address[/code] is set as [code]"0.0.0.0"[/code] (for IPv4) or [code]"::"[/code] (for IPv6), the server will listen on all available addresses matching that IP type.
|
|
If [code]bind_address[/code] is set to any valid address (e.g. [code]"192.168.1.101"[/code], [code]"::1"[/code], etc), the server will only listen on the interface with that addresses (or fail if no interface with the given address exists).
|
|
</description>
|
|
</method>
|
|
<method name="stop">
|
|
<return type="void">
|
|
</return>
|
|
<description>
|
|
Stops listening.
|
|
</description>
|
|
</method>
|
|
<method name="take_connection">
|
|
<return type="StreamPeerTCP">
|
|
</return>
|
|
<description>
|
|
If a connection is available, returns a StreamPeerTCP with the connection.
|
|
</description>
|
|
</method>
|
|
</methods>
|
|
<constants>
|
|
</constants>
|
|
</class>
|