socket

package
v0.0.0-...-28112d2 Latest Latest
Warning

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

Go to latest
Published: Apr 1, 2017 License: Unlicense Imports: 3 Imported by: 2

Documentation

Index

Constants

View Source
const MagicString = "i3-ipc"

Variables

This section is empty.

Functions

This section is empty.

Types

type Header struct {
	MagicString   [6]byte
	PayloadLength uint32
	MessageType   uint32
}

type Message

type Message struct {
	Type    uint32
	Payload string
}

type Socket

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

func NewSocket

func NewSocket(conn io.ReadWriter) *Socket

func (*Socket) Read

func (s *Socket) Read() (Message, error)

func (*Socket) Write

func (s *Socket) Write(message Message) error

type ValueSocket

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

func NewValueSocket

func NewValueSocket(conn io.ReadWriter) *ValueSocket

func (*ValueSocket) Read

func (v *ValueSocket) Read(val interface{}) (uint32, error)

func (*ValueSocket) Write

func (v *ValueSocket) Write(messageType uint32, val interface{}) error

Jump to

Keyboard shortcuts

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