handler

package
v1.0.2 Latest Latest
Warning

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

Go to latest
Published: Nov 28, 2022 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewHandler

func NewHandler(ctx context.Context, router string, mh clientHandler, removeChan chan<- int64) *handler

Types

type Interface

type Interface interface {
	RegisterId(id int64)
	Id() int64
	RegisterRemoveChan(ch chan<- int64)
	RegisterConnWriteChan(ch chan<- []byte)
	RegisterConnClose(do func())
	RegisterConnPing(do func())
	Ping()
	Handler(data []byte) (res []byte, err error)
	Run()
	Close()
}

type MessageHandler

type MessageHandler interface {
	Read() <-chan []byte
	Write(in []byte) error
}

Jump to

Keyboard shortcuts

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