StreamPeerBuffer
Hereda: StreamPeer < RefCounted < Object
Un par de flujo utilizado para manejar flujos de datos binarios.
Descripción
A data buffer stream peer that uses a byte array as the stream. This object can be used to handle binary data from network sessions. To handle binary data stored in files, FileAccess can be used directly.
A StreamPeerBuffer object keeps an internal cursor which is the offset in bytes to the start of the buffer. Get and put operations are performed at the cursor position and will move the cursor accordingly.
Propiedades
|
Métodos
void |
clear() |
duplicate() const |
|
get_position() const |
|
get_size() const |
|
void |
|
void |
Descripciones de Propiedades
PackedByteArray data_array = PackedByteArray() 🔗
void set_data_array(value: PackedByteArray)
PackedByteArray get_data_array()
El búfer de datos subyacente. Establecer este valor reinicia el cursor.
Note: The returned array is copied and any changes to it will not update the original property value. See PackedByteArray for more details.
Descripciones de Métodos
void clear() 🔗
Limpia el data_array y reinicia el cursor.
StreamPeerBuffer duplicate() const 🔗
Devuelve un nuevo StreamPeerBuffer con el mismo contenido de data_array.
Devuelve la posición actual del cursor.
Devuelve el tamaño de data_array.
Redimensiona el data_array. Esto no actualiza el cursor.
Mueve el cursor a la posición especificada. position debe ser un índice válido de data_array.