session

package
v0.0.0-...-02b3c19 Latest Latest
Warning

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

Go to latest
Published: Jun 28, 2018 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CallbackFunc

type CallbackFunc func(frame.Frame)

type ILayer

type ILayer interface {
	MakeRequest(request *Request)
	SendFrameDirect(req *frame.Frame)
	UnsolicitedFramesChan() chan frame.Frame
}

type Layer

type Layer struct {
	UnsolicitedFrames chan frame.Frame
	// contains filtered or unexported fields
}

func NewSessionLayer

func NewSessionLayer(frameLayer frame.ILayer) *Layer

func (*Layer) MakeRequest

func (s *Layer) MakeRequest(request *Request)

func (*Layer) SendFrameDirect

func (s *Layer) SendFrameDirect(req *frame.Frame)

Be careful with this. Should not be called outside of a callback

func (*Layer) UnsolicitedFramesChan

func (s *Layer) UnsolicitedFramesChan() chan frame.Frame

type Request

type Request struct {
	FunctionID byte
	Payload    []byte

	HasReturn      bool
	ReturnCallback func(error, *frame.Frame) bool

	ReceivesCallback bool
	Callback         CallbackFunc
	Lock             bool
	Release          chan bool
	Timeout          time.Duration
}

Jump to

Keyboard shortcuts

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