StreamPeerBuffer

package
v0.0.0-...-546f9d4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 5, 2025 License: MIT Imports: 20 Imported by: 0

Documentation

Overview

Package StreamPeerBuffer provides methods for working with StreamPeerBuffer object instances.

Index

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 Any

type Any interface {
	gd.IsClass
	AsStreamPeerBuffer() Instance
}

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 New

func New() Instance

func (Instance) AsObject

func (self Instance) AsObject() [1]gd.Object

func (Instance) AsRefCounted

func (self Instance) AsRefCounted() [1]gd.RefCounted

func (Instance) AsStreamPeer

func (self Instance) AsStreamPeer() StreamPeer.Instance

func (Instance) AsStreamPeerBuffer

func (self Instance) AsStreamPeerBuffer() Instance

func (Instance) Clear

func (self Instance) Clear()

Clears the [member data_array] and resets the cursor.

func (Instance) DataArray

func (self Instance) DataArray() []byte

func (Instance) Duplicate

func (self Instance) Duplicate() [1]gdclass.StreamPeerBuffer

Returns a new [StreamPeerBuffer] with the same [member data_array] content.

func (Instance) GetPosition

func (self Instance) GetPosition() int

Returns the current cursor position.

func (Instance) GetSize

func (self Instance) GetSize() int

Returns the size of [member data_array].

func (Instance) Resize

func (self Instance) Resize(size int)

Resizes the [member data_array]. This [i]doesn't[/i] update the cursor.

func (Instance) SeekTo

func (self Instance) SeekTo(position int)

Moves the cursor to the specified position. [param position] must be a valid index of [member data_array].

func (Instance) SetDataArray

func (self Instance) SetDataArray(value []byte)

func (*Instance) UnsafePointer

func (self *Instance) UnsafePointer() unsafe.Pointer

func (Instance) Virtual

func (self Instance) Virtual(name string) reflect.Value

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL