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...
StreamPeer¶
Inherits: RefCounted < Object
Inherited By: StreamPeerBuffer, StreamPeerExtension, StreamPeerGZIP, StreamPeerTCP, StreamPeerTLS
Abstract base class for interacting with streams.
Description¶
StreamPeer is an abstract base class mostly used for stream-based protocols (such as TCP). It provides an API for sending and receiving data through streams as raw data or strings.
Note: When exporting to Android, make sure to enable the INTERNET
permission in the Android export preset before exporting the project or using one-click deploy. Otherwise, network communication of any kind will be blocked by Android.
Properties¶
|
Methods¶
get_8 ( ) |
|
get_16 ( ) |
|
get_32 ( ) |
|
get_64 ( ) |
|
get_available_bytes ( ) const |
|
get_double ( ) |
|
get_float ( ) |
|
get_partial_data ( int bytes ) |
|
get_string ( int bytes=-1 ) |
|
get_u8 ( ) |
|
get_u16 ( ) |
|
get_u32 ( ) |
|
get_u64 ( ) |
|
get_utf8_string ( int bytes=-1 ) |
|
void |
|
void |
|
void |
|
void |
|
put_data ( PackedByteArray data ) |
|
void |
put_double ( float value ) |
void |
|
put_partial_data ( PackedByteArray data ) |
|
void |
put_string ( String value ) |
void |