Documentation
¶
Overview ¶
Package StreamPeerBuffer provides methods for working with StreamPeerBuffer object instances.
Index ¶
- type Advanced
- type Any
- type Extension
- type ID
- 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() Instance
- func (self Instance) GetPosition() int
- func (self Instance) GetSize() int
- func (self Instance) ID() ID
- func (self Instance) Resize(size int)
- func (self Instance) SeekTo(position int)
- func (self Instance) SetDataArray(value []byte)
- func (self *Instance) SetObject(obj [1]gd.Object) bool
- 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 Extension ¶
Extension can be embedded in a new struct to create an extension of this class. T should be the type that is embedding this Extension
func (*Extension[T]) AsRefCounted ¶
func (self *Extension[T]) AsRefCounted() [1]gd.RefCounted
func (*Extension[T]) AsStreamPeer ¶
func (self *Extension[T]) AsStreamPeer() StreamPeer.Instance
func (*Extension[T]) AsStreamPeerBuffer ¶
type ID ¶
ID is a typed object ID (reference) to an instance of this class, use it to store references to objects with unknown lifetimes, as an ID will not panic on use if the underlying object has been destroyed.
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 ¶
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].