channel

package
v0.0.0-...-1118e41 Latest Latest
Warning

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

Go to latest
Published: Apr 17, 2017 License: GPL-3.0 Imports: 11 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 interface {
	ID() uint32
	String() string
	Close()
	IsClosedByRemote() bool
	SetClosedByRemote()
	HandleIn(m *tcommon.TMSG) error
	Serve() error
}

type Pool

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

func NewPool

func NewPool() *Pool

func (*Pool) Delete

func (p *Pool) Delete(c Channel) error

func (*Pool) Exist

func (p *Pool) Exist(id uint32) bool

func (*Pool) Get

func (p *Pool) Get(id uint32) Channel

func (*Pool) IterBuffered

func (p *Pool) IterBuffered() <-chan poolTuple

Returns a buffered iterator which could be used in a for range loop.

func (*Pool) New

func (p *Pool) New(tid uint32, outbound chan []byte, conn net.Conn) Channel

func (*Pool) NewByID

func (p *Pool) NewByID(cid uint32, tid uint32, outbound chan []byte, conn net.Conn) Channel

Jump to

Keyboard shortcuts

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