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...
StreamPeerBuffer
Eredita: StreamPeer < RefCounted < Object
Un peer di flusso utilizzato per gestire flussi di dati binari.
Descrizione
Un peer di flusso di buffer di dati che utilizza un array di byte come flusso. Questo oggetto può essere utilizzato per gestire i dati binari da sessioni di rete. Per gestire i dati binari memorizzati nei file, è possibile usare direttamente FileAccess.
Un oggetto StreamPeerBuffer mantiene un cursore interno che è l'offset in byte all'inizio del buffer. Le operazioni Get e Put vengono eseguite nella posizione del cursore e sposteranno il cursore di conseguenza.
Proprietà
|
Metodi
void |
clear() |
duplicate() const |
|
get_position() const |
|
get_size() const |
|
void |
|
void |
Descrizioni delle proprietà
PackedByteArray data_array = PackedByteArray() 🔗
void set_data_array(value: PackedByteArray)
PackedByteArray get_data_array()
Il buffer di dati sottostante. Impostare questo valore ripristina la posizione del cursore.
Note: The returned array is copied and any changes to it will not update the original property value. See PackedByteArray for more details.
Descrizioni dei metodi
void clear() 🔗
Cancella l'data_array e ripristina il cursore.
StreamPeerBuffer duplicate() const 🔗
Restituisce un nuovo StreamPeerBuffer con lo stesso contenuto di data_array.
Restituisce la posizione attuale del cursore.
Restituisce la dimensione di data_array.
Ridimensiona l'data_array. Questo metodo non aggiorna il cursore.
Sposta il cursore nella posizione specificata. position deve essere un indice valido di data_array.