conn

package
v0.0.0-...-25e1a75 Latest Latest
Warning

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

Go to latest
Published: Jul 6, 2021 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Channel

type Channel struct {
	Logger log.Logger
	// contains filtered or unexported fields
}

TODO: lowercase. NOTE: not goroutine-safe.

type ChannelDescriptor

type ChannelDescriptor struct {
	ID                  byte
	Priority            int
	SendQueueCapacity   int
	RecvBufferCapacity  int
	RecvMessageCapacity int
}

func (ChannelDescriptor) FillDefaults

func (chDesc ChannelDescriptor) FillDefaults() (filled ChannelDescriptor)

type MConnection

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

func NewMConnection

func NewMConnection(
	conn net.Conn,
	chDescs []*ChannelDescriptor,
	onReceive receiveCbFunc,
	onError errorCbFunc,
) *MConnection

func (*MConnection) OnStart

func (c *MConnection) OnStart() error

func (*MConnection) OnStop

func (c *MConnection) OnStop()

func (*MConnection) Send

func (c *MConnection) Send(chID byte, msgBytes []byte) bool

Jump to

Keyboard shortcuts

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