core

package
v1.1.2 Latest Latest
Warning

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

Go to latest
Published: Apr 17, 2023 License: BSD-3-Clause, GPL-3.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CVAL

func CVAL(p *[]uint8) int

func CVAL2

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

func Decompress

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

main decompress function

func PutUint16BE

func PutUint16BE(data uint16) (uint8, uint8)

func REPEAT

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

func RGB565ToRGB

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

func Random

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

func Reverse(s []byte) []byte

func StartReadBytes

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

func Uint16BE

func Uint16BE(d0, d1 uint8) uint16

func UnicodeDecode

func UnicodeDecode(p []byte) string

func UnicodeEncode

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 FastPathListener

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

type FastPathSender

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

type PublicKey

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

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