StreamPeerSocket
Inherits: StreamPeer < RefCounted < Object
Inherited by: StreamPeerTCP, StreamPeerUDS
Description
Section titled “Description”Abstract base class for interacting with socket streams.
StreamPeerSocket is an abstract base class that defines common behavior for socket-based streams.
Methods
Section titled “Methods”| Returns | Method |
|---|---|
| void | disconnect_from_host() |
| Status | get_status() const |
| Error | poll() |
Enumerations
Section titled “Enumerations”Status
enum Status
STATUS_NONE = 0
The initial status of the StreamPeerSocket. This is also the status after disconnecting.
STATUS_CONNECTING = 1
A status representing a StreamPeerSocket that is connecting to a host.
STATUS_CONNECTED = 2
A status representing a StreamPeerSocket that is connected to a host.
STATUS_ERROR = 3
A status representing a StreamPeerSocket in error state.
Method descriptions
Section titled “Method descriptions”disconnect_from_host
void disconnect_from_host()
Disconnects from host.
get_status
Status get_status() const
Returns the status of the connection.
poll
Error poll()
Polls the socket, updating its state. See get_status().
