Attention: Here be dragons
This is the latest
(unstable) version of this documentation, which may document features
not available in or compatible with released stable versions of Godot.
Checking the stable version of the documentation...
StreamPeerSocket
繼承: StreamPeer < RefCounted < Object
被繼承: StreamPeerTCP, StreamPeerUDS
Abstract base class for interacting with socket streams.
說明
StreamPeerSocket is an abstract base class that defines common behavior for socket-based streams.
方法
void |
|
get_status() const |
|
poll() |
列舉
enum Status: 🔗
Status STATUS_NONE = 0
The initial status of the StreamPeerSocket. This is also the status after disconnecting.
Status STATUS_CONNECTING = 1
A status representing a StreamPeerSocket that is connecting to a host.
Status STATUS_CONNECTED = 2
A status representing a StreamPeerSocket that is connected to a host.
Status STATUS_ERROR = 3
A status representing a StreamPeerSocket in error state.
方法說明
void disconnect_from_host() 🔗
與主機斷開連接。
Returns the status of the connection.
Polls the socket, updating its state. See get_status().