Documentation
¶
Overview ¶
Package StreamPeerBuffer provides methods for working with StreamPeerBuffer object instances.
Index ¶
- type Advanced
- type Any
- type Instance
- func (self Instance) AsObject() [1]gd.Object
- func (self Instance) AsRefCounted() [1]gd.RefCounted
- func (self Instance) AsStreamPeer() StreamPeer.Instance
- func (self Instance) AsStreamPeerBuffer() Instance
- func (self Instance) Clear()
- func (self Instance) DataArray() []byte
- func (self Instance) Duplicate() [1]gdclass.StreamPeerBuffer
- func (self Instance) GetPosition() int
- func (self Instance) GetSize() int
- func (self Instance) Resize(size int)
- func (self Instance) SeekTo(position int)
- func (self Instance) SetDataArray(value []byte)
- func (self *Instance) UnsafePointer() unsafe.Pointer
- func (self Instance) Virtual(name string) reflect.Value
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Advanced ¶
type Advanced = class
Advanced exposes a 1:1 low-level instance of the class, undocumented, for those who know what they are doing.
type Instance ¶
type Instance [1]gdclass.StreamPeerBuffer
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.
var Nil Instance
Nil is a nil/null instance of the class. Equivalent to the zero value.
func (Instance) AsRefCounted ¶
func (self Instance) AsRefCounted() [1]gd.RefCounted
func (Instance) AsStreamPeer ¶
func (self Instance) AsStreamPeer() StreamPeer.Instance
func (Instance) AsStreamPeerBuffer ¶
func (Instance) Clear ¶
func (self Instance) Clear()
Clears the [member data_array] and resets the cursor.
func (Instance) Duplicate ¶
func (self Instance) Duplicate() [1]gdclass.StreamPeerBuffer
Returns a new [StreamPeerBuffer] with the same [member data_array] content.
func (Instance) GetPosition ¶
Returns the current cursor position.
func (Instance) SeekTo ¶
Moves the cursor to the specified position. [param position] must be a valid index of [member data_array].