emule

package
v0.0.0-...-3ac9340 Latest Latest
Warning

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

Go to latest
Published: Dec 8, 2022 License: GPL-3.0 Imports: 12 Imported by: 1

Documentation

Index

Constants

View Source
const (
	C_NONE constrainttype = iota
	C_MAIN
	C_AND
	C_OR
	C_NOT
	C_CODEC
	C_MINSIZE
	C_MAXSIZE
	C_FILETYPE
	C_FILEEXT
)

Variables

This section is empty.

Functions

func ByteToFloat32

func ByteToFloat32(data []byte) (ret float32)

func ByteToInt16

func ByteToInt16(data []byte) (ret int16)

func ByteToInt32

func ByteToInt32(data []byte) (ret int32)

func ByteToUint16

func ByteToUint16(data []byte) (ret uint16)

func ByteToUint32

func ByteToUint32(data []byte) (ret uint32)

func EncodeByteMsg

func EncodeByteMsg(protocol byte, msgcode byte, body []byte) []byte

func EncodeByteString

func EncodeByteString(str string) []byte

func EncodeByteTag

func EncodeByteTag(ttype byte, tagname []byte, tagvalue []byte) []byte

func EncodeByteTagInt

func EncodeByteTagInt(tagname []byte, tagvalue uint32) []byte

func EncodeByteTagName

func EncodeByteTagName(nbuf []byte) []byte

func EncodeByteTagNameInt

func EncodeByteTagNameInt(val byte) []byte

func EncodeByteTagNameStr

func EncodeByteTagNameStr(val string) []byte

func EncodeByteTagString

func EncodeByteTagString(tagname []byte, tagvalue string) []byte

func Float32ToByte

func Float32ToByte(data float32) (ret []byte)

func HighId

func HighId(addr string) (ret uint32)

func Int16ToByte

func Int16ToByte(data int16) (ret []byte)

func Int32ToByte

func Int32ToByte(data int32) (ret []byte)

func StringToByte

func StringToByte(val string) []byte

func UInt16ToByte

func UInt16ToByte(data uint16) (ret []byte)

func UInt32ToByte

func UInt32ToByte(data uint32) (ret []byte)

Types

type Constraint

type Constraint struct {
	Type  constrainttype
	Value []byte
	Left  *Constraint
	Right *Constraint
}

type OneTag

type OneTag struct {
	Type       byte
	NameByte   byte
	NameString string
	Value      []byte
	ValueLen   uint16
}

type SockSrv

type SockSrv struct {
	Host      string
	Port      int
	Debug     bool
	Ssname    string
	Ssdesc    string
	Ssmsg     string
	I2P       bool
	SAM       string
	SAMPort   int
	SQL       bool
	SqlDriver string
	SqlUser   string
	SqlPW     string
	SqlAddr   string
	SqlPort   int
	SqlDB     string
	// contains filtered or unexported fields
}

func NewSockSrv

func NewSockSrv(host string, port int, debug bool) *SockSrv

func (*SockSrv) Start

func (this *SockSrv) Start()

func (*SockSrv) Stop

func (this *SockSrv) Stop()

Jump to

Keyboard shortcuts

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