wire

package
v0.0.0-...-88014a2 Latest Latest
Warning

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

Go to latest
Published: Jun 15, 2019 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ArgType

type ArgType byte
const (
	ArgInt    ArgType = 'i'
	ArgUint   ArgType = 'u'
	ArgFixed  ArgType = 'f'
	ArgString ArgType = 's'
	ArgObject ArgType = 'o'
	ArgNewID  ArgType = 'n'
	ArgArray  ArgType = 'a'
	ArgFD     ArgType = 'h'
)

type Argument

type Argument struct {
	Type      ArgType
	Nullable  bool
	Interface *Interface
}

type Conn

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

func NewConn

func NewConn(c net.Conn) *Conn

func (*Conn) Close

func (c *Conn) Close() error

func (*Conn) Create

func (c *Conn) Create(iface *Interface) *Object

func (*Conn) Delete

func (c *Conn) Delete(obj *Object)

func (*Conn) Get

func (c *Conn) Get(id uint32) *Object

func (*Conn) ReadMessage

func (c *Conn) ReadMessage() (*Object, Opcode, []interface{}, error)

func (*Conn) WriteMessage

func (c *Conn) WriteMessage(sender *Object, opcode Opcode, args ...interface{}) error

type Interface

type Interface struct {
	Name     string
	Version  uint32
	Requests []Message
	Events   []Message
}

type Message

type Message struct {
	Name    string
	Version uint32
	Args    []Argument
}

type Object

type Object struct {
	Data interface{}
	// contains filtered or unexported fields
}

func (*Object) Interface

func (o *Object) Interface() *Interface

type Opcode

type Opcode uint16

Jump to

Keyboard shortcuts

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