Skip to content
0.2.0-dev Download ZIP
45 lines ·1.6 KB Raw
1<?xml version="1.0" encoding="UTF-8" ?>
2<class name="StreamPeerSocket" inherits="StreamPeer" api_type="core" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
3 <brief_description>
4 Abstract base class for interacting with socket streams.
5 </brief_description>
6 <description>
7 StreamPeerSocket is an abstract base class that defines common behavior for socket-based streams.
8 </description>
9 <tutorials>
10 </tutorials>
11 <methods>
12 <method name="disconnect_from_host">
13 <return type="void" />
14 <description>
15 Disconnects from host.
16 </description>
17 </method>
18 <method name="get_status" qualifiers="const">
19 <return type="int" enum="StreamPeerSocket.Status" />
20 <description>
21 Returns the status of the connection.
22 </description>
23 </method>
24 <method name="poll">
25 <return type="int" enum="Error" />
26 <description>
27 Polls the socket, updating its state. See [method get_status].
28 </description>
29 </method>
30 </methods>
31 <constants>
32 <constant name="STATUS_NONE" value="0" enum="Status">
33 The initial status of the [StreamPeerSocket]. This is also the status after disconnecting.
34 </constant>
35 <constant name="STATUS_CONNECTING" value="1" enum="Status">
36 A status representing a [StreamPeerSocket] that is connecting to a host.
37 </constant>
38 <constant name="STATUS_CONNECTED" value="2" enum="Status">
39 A status representing a [StreamPeerSocket] that is connected to a host.
40 </constant>
41 <constant name="STATUS_ERROR" value="3" enum="Status">
42 A status representing a [StreamPeerSocket] in error state.
43 </constant>
44 </constants>
45</class>