core

package
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: May 11, 2023 License: GPL-3.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BytesToUint64 added in v0.2.0

func BytesToUint64(b []byte) uint64

func CVAL added in v0.2.0

func CVAL(p *[]uint8) int

func CVAL2 added in v0.2.0

func CVAL2(p *[]uint8, v *uint16)

func Decompress added in v0.2.0

func Decompress(input []uint8, width, height int, Bpp int) []uint8

main decompress function

func LittleEndianBytesToUTF16 added in v0.2.0

func LittleEndianBytesToUTF16(u []byte) []uint16

func PutUint16BE added in v0.2.0

func PutUint16BE(data uint16) (uint8, uint8)

func REPEAT added in v0.2.0

func REPEAT(f func(), count, x *int, width int)

func RGB565ToRGB added in v0.2.0

func RGB565ToRGB(data uint16) (r, g, b uint8)

func Random added in v0.2.0

func Random(n int) []byte

func ReadByte

func ReadByte(r io.Reader) (byte, error)

func ReadBytes

func ReadBytes(len int, r io.Reader) ([]byte, error)

func ReadUInt32BE

func ReadUInt32BE(r io.Reader) (uint32, error)

func ReadUInt32LE

func ReadUInt32LE(r io.Reader) (uint32, error)

func ReadUInt8

func ReadUInt8(r io.Reader) (uint8, error)

func ReadUint16BE

func ReadUint16BE(r io.Reader) (uint16, error)

func ReadUint16LE

func ReadUint16LE(r io.Reader) (uint16, error)

func Reverse added in v0.2.0

func Reverse(s []byte) []byte

func StartReadBytes

func StartReadBytes(len int, r io.Reader, cb ReadBytesComplete)

func UTF16ToLittleEndianBytes added in v0.2.0

func UTF16ToLittleEndianBytes(u []uint16) []byte

func Uint16BE added in v0.2.0

func Uint16BE(d0, d1 uint8) uint16

func UnicodeDecode added in v0.2.0

func UnicodeDecode(p []byte) string

func UnicodeEncode added in v0.2.0

func UnicodeEncode(p string) []byte

s.encode('utf-16le')

func WriteByte

func WriteByte(data byte, w io.Writer) (int, error)

func WriteBytes

func WriteBytes(data []byte, w io.Writer) (int, error)

func WriteUInt16BE

func WriteUInt16BE(data uint16, w io.Writer) (int, error)

func WriteUInt16LE

func WriteUInt16LE(data uint16, w io.Writer) (int, error)

func WriteUInt32BE

func WriteUInt32BE(data uint32, w io.Writer) (int, error)

func WriteUInt32LE

func WriteUInt32LE(data uint32, w io.Writer) (int, error)

func WriteUInt8

func WriteUInt8(data uint8, w io.Writer) (int, error)

Types

type ChannelSender added in v0.2.0

type ChannelSender interface {
	SendToChannel(channel string, s []byte) (int, error)
}

type FastPathListener

type FastPathListener interface {
	RecvFastPath(secFlag byte, s []byte)
}

type FastPathSender

type FastPathSender interface {
	SendFastPath(secFlag byte, s []byte) (int, error)
}

type PublicKey added in v0.2.0

type PublicKey struct {
	N *big.Int `asn1:"explicit,tag:0"` // modulus
	E int      `asn1:"explicit,tag:1"` // public exponent
}

type ReadBytesComplete

type ReadBytesComplete func(result []byte, err error)

type SocketLayer

type SocketLayer struct {
	// contains filtered or unexported fields
}

func NewSocketLayer

func NewSocketLayer(conn net.Conn) *SocketLayer

func (*SocketLayer) Close

func (s *SocketLayer) Close() error

func (*SocketLayer) Read

func (s *SocketLayer) Read(b []byte) (n int, err error)

func (*SocketLayer) StartTLS

func (s *SocketLayer) StartTLS() error

func (*SocketLayer) TlsPubKey added in v0.2.0

func (s *SocketLayer) TlsPubKey() ([]byte, error)

func (*SocketLayer) Write

func (s *SocketLayer) Write(b []byte) (n int, err error)

type Transport

type Transport interface {
	Read(b []byte) (n int, err error)
	Write(b []byte) (n int, err error)
	Close() error

	On(event, listener interface{}) *emission.Emitter
	Once(event, listener interface{}) *emission.Emitter
	Emit(event interface{}, arguments ...interface{}) *emission.Emitter
}

Jump to

Keyboard shortcuts

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